summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-flows/src
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-flows/src')
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy256
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy331
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy357
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy455
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy327
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy326
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy620
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy356
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy542
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy386
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy362
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy420
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy308
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy87
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy367
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy545
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy207
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy258
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy260
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy451
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy268
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy1680
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy393
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy279
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy795
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy242
-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/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy282
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy2133
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy666
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy242
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy616
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy618
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy467
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy360
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy640
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy1132
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy439
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy1077
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy338
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy317
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy400
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy472
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy285
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy711
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy609
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy355
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy161
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy538
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy142
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy332
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy451
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy345
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy1408
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy310
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy1040
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy414
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy59
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy611
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy148
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy296
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy570
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy403
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy326
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy504
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy468
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy445
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy561
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy481
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy835
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy483
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy599
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy814
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy461
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy678
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy279
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy674
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy278
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy368
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy369
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn335
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn325
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn391
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn452
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateNetworkInstance.bpmn340
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn287
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVFCNSResource.bpmn277
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn1539
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn1443
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleInfra.bpmn700
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn514
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVnfInfra.bpmn340
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn381
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn331
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteNetworkInstance.bpmn372
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn258
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVFCNSResource.bpmn166
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn812
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleInfra.bpmn331
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn568
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn353
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ReplaceVnfInfra.bpmn1815
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ScaleCustomE2EServiceInstance.bpmn379
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn693
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateNetworkInstance.bpmn322
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfra.bpmn297
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfraV2.bpmn412
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn517
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVnfInfra.bpmn1685
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfConfigUpdate.bpmn1636
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn2302
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelVersions.bpmn330
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn227
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn755
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRGRollback.bpmn575
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn755
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXCRollback.bpmn575
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn136
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn544
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceRollback.bpmn373
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn1051
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn1363
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn517
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateResources.bpmn370
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn515
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn373
-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/DoCreateVFCNetworkServiceInstance.bpmn261
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModule.bpmn1701
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn978
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeRollback.bpmn247
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn362
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn635
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn527
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn541
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn470
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn928
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceBRG.bpmn422
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceTXC.bpmn422
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn378
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn933
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn547
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn486
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn455
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn373
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn275
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModule.bpmn433
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleFromVnf.bpmn396
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleVolumeV2.bpmn208
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnf.bpmn303
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn490
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn187
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleVFCServiceInstance.bpmn89
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn293
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn648
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn799
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn829
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn374
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVfModule.bpmn671
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVnfAndModules.bpmn275
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/RollbackVnf.bpmn346
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/SetRefactorServiceDecomp.bpmn68
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy84
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy235
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy379
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy96
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy208
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy148
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy125
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy418
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy167
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy103
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy369
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy4324
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy135
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy106
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy202
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy229
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy135
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy106
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy169
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy343
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy1948
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy127
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy172
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy163
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy152
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy162
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy332
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy2762
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy309
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy126
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy358
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy134
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy1269
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy773
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy654
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy999
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy654
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy957
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy606
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy607
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy124
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn35
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json12
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json434
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json27
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml75
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json226
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json216
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json141
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json166
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json891
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml145
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json162
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml149
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf107
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net165
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException12
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml80
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml74
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml57
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json42
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json71
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json45
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json77
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json79
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json77
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml61
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml42
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml169
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml14
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json104
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml170
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml212
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml33
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml30
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json186
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json56
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json70
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json125
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml80
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml95
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml57
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json64
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json64
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml29
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json127
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml35
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json94
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json98
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml29
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml315
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml141
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml81
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml82
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml56
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml27
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml25
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml3
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml340
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml65
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn35
470 files changed, 122282 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
new file mode 100644
index 0000000000..880a44c1b2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
@@ -0,0 +1,256 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.CompareModelsResult
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+
+/**
+ * This groovy class supports the <class>CompareModelofE2EServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - subscriptionServiceType
+ * @param - serviceInstanceId
+ * @param - modelInvariantIdTarget
+ * @param - modelVersionIdTarget
+
+ *
+ * Outputs:
+ * @param - WorkflowException
+ */
+public class CompareModelofE2EServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CompareModelofE2EServiceInstance.class);
+
+ String Prefix="CMPMDSI_"
+ private static final String DebugFlag = "isDebugEnabled"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ msoLogger.trace("preProcessRequest Request ")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(siRequest)
+
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.info("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "serviceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("serviceType", subscriptionServiceType)
+ }
+
+ //modelInvariantIdTarget
+ String modelInvariantIdTarget = jsonUtil.getJsonValue(siRequest, "modelInvariantIdTarget")
+ if (isBlank(modelInvariantIdTarget)) {
+ msg = "Input modelInvariantIdTarget' is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("modelInvariantIdTarget", modelInvariantIdTarget)
+ }
+
+ //modelVersionIdTarget
+ String modelVersionIdTarget = jsonUtil.getJsonValue(siRequest, "modelVersionIdTarget")
+ if (isBlank(modelVersionIdTarget)) {
+ msg = "Input modelVersionIdTarget is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("modelVersionIdTarget", modelVersionIdTarget)
+ }
+
+ execution.setVariable("operationType", "CompareModel")
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ msoLogger.trace("sendSyncResponse ")
+
+ try {
+ CompareModelsResult compareModelsResult = execution.getVariable("compareModelsResult")
+
+ // RESTResponse (for API Handler(APIH) Reply Task)
+ String syncResponse = compareModelsResult.toJsonStringNoRootName()
+ msoLogger.info(" sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit sendSyncResopnse ")
+ }
+
+ public void sendSyncError (DelegateExecution execution) {
+ msoLogger.trace("sendSyncError ")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.info(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ msoLogger.trace("prepareCompletion ")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>COMPAREMODEL</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>E2E Service Instance Compare model successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>CompareModelofE2EServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ msoLogger.info(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit prepareCompletionRequest ")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ msoLogger.trace("prepareFalloutRequest ")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.info(" Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>COMPAREMODEL</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.info("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in CompareModelofE2EServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>COMPAREMODEL</action>
+ <source>UUI</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("Exit prepareFalloutRequest ")
+ }
+
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
new file mode 100644
index 0000000000..1034fa2d4d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -0,0 +1,331 @@
+/*-
+ * ============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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+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.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
+ * AlaCarte flow for 1702 ServiceInstance Create
+ *
+ */
+public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateCustomE2EServiceInstance.class);
+
+
+ public void preProcessRequest (DelegateExecution execution) {
+ msoLogger.trace("start preProcessRequest")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ try {
+ String siRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.debug("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ }
+ msoLogger.debug("Generated new Service Instance:" + serviceInstanceId)
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestInfo
+ execution.setVariable("source", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source"))
+ execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName"))
+ execution.setVariable("disableRollback", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.suppressRollback"))
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ msoLogger.debug(msg)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+
+ //modelInfo
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ }
+
+ msoLogger.debug("modelInfo: " + serviceModelInfo)
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(siRequest)
+
+ //InputParams
+ def userParamsList = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+ if (userParamsList) {
+ for (def i=0; i<userParamsList.size(); i++) {
+ def userParams1 = userParamsList.get(i)
+ userParams1.each { param -> inputMap.put(param.key, param.value)}
+ }
+ }
+
+ msoLogger.debug("User Input Parameters map: " + inputMap.toString())
+ execution.setVariable("serviceInputParams", inputMap)
+ execution.setVariable("uuiRequest", inputMap.get("UUIRequest"))
+ execution.setVariable("mso.adapters.openecomp.db.endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+ //TODO
+ //execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))
+ //execution.setVariable("failExists", true)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("finished preProcessRequest")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ msoLogger.trace("start sendSyncResponse")
+ try {
+ String operationId = execution.getVariable("operationId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ // RESTResponse for API Handler (APIH) Reply Task
+ String createServiceRestRequest = """{"service":{"serviceId":"${serviceInstanceId}","operationId":"${operationId}"}}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + createServiceRestRequest)
+ sendWorkflowResponse(execution, 202, createServiceRestRequest)
+ execution.setVariable("sentSyncResponse", true)
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("finished sendSyncResponse")
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+ msoLogger.trace("start sendSyncError")
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.debug("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+ msoLogger.trace("finished sendSyncError")
+ }
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ msoLogger.trace("start prepareCompletionRequest")
+ try {
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <status-message>Service Instance was created successfully.</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>CreateGenericALaCarteServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ msoLogger.debug("Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("finished prepareCompletionRequest")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ msoLogger.trace("start prepareFalloutRequest")
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug("Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.debug("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in CreateGenericALaCarteServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>UUI</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("finished prepareFalloutRequest")
+ }
+
+ /**
+ * Init the service Operation Status
+ */
+ public void prepareInitServiceOperationStatus(DelegateExecution execution){
+ msoLogger.trace("start prepareInitServiceOperationStatus")
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = UUID.randomUUID().toString()
+ String operationType = "CREATE"
+ String userId = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service creation"
+ msoLogger.debug("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint",execution)
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ msoLogger.debug("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ msoLogger.debug("Outgoing updateServiceOperStatusRequest: \n" + payload)
+ msoLogger.debug("CreateVfModuleInfra Outgoing updateServiceOperStatusRequest Request: " + payload)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("finished prepareInitServiceOperationStatus")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
new file mode 100644
index 0000000000..4405718c57
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
@@ -0,0 +1,357 @@
+/*-
+ * ============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.json.JSONException;
+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.ServiceDecomposition
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>CreateGenericALaCarteServiceInstance.bpmn</class> process.
+ * AlaCarte flow for 1702 ServiceInstance Create
+ *
+ */
+public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateGenericALaCarteServiceInstance.class);
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ try {
+
+ String siRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.debug("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ msoLogger.debug("Generated new Service Instance ID:" + serviceInstanceId)
+ } else {
+ msoLogger.debug("Using provided Service Instance ID:" + serviceInstanceId)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestInfo
+ execution.setVariable("source", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source"))
+ execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName"))
+ execution.setVariable("disableRollback", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.suppressRollback"))
+ String productFamilyId = null;
+ try {
+ productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ } catch (JSONException e) {
+ productFamilyId = null;
+ }
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ msoLogger.debug(msg)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+
+ //modelInfo
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ }
+
+ msoLogger.debug("modelInfo" + serviceModelInfo)
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(siRequest)
+
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+ if (userParams) {
+ userParams.each {
+ userParam -> inputMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug("User Input Parameters map: " + userParams.toString())
+ execution.setVariable("serviceInputParams", inputMap)
+
+ //TODO
+ //execution.setVariable("failExists", true)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start sendSyncResponse")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ // RESTResponse for API Handler (APIH) Reply Task
+ String createServiceRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + createServiceRestRequest)
+ sendWorkflowResponse(execution, 202, createServiceRestRequest)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit sendSyncResopnse")
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start sendSyncError")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareDecomposeService(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Inside prepareDecomposeService of CreateGenericALaCarteServiceInstance ")
+ try {
+ String siRequest = execution.getVariable("bpmnRequest")
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericALaCarteServiceInstance flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.trace("Completed prepareDecomposeService of CreateGenericALaCarteServiceInstance")
+ }
+
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ msoLogger.trace("Inside prepareCreateServiceInstance of CreateGenericALaCarteServiceInstance")
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ def siRequest = execution.getVariable("bpmnRequest")
+ Map reqMap = jsonSlurper.parseText(siRequest)
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+ Map<String, String> inputMap = [:]
+ if (userParams != null) {
+ userParams.each {
+ userParam -> inputMap.put(userParam.name, userParam.value)
+ }
+ }
+
+ msoLogger.debug("User Input Parameters map: " + userParams.toString())
+ execution.setVariable("serviceInputParams", inputMap)
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ serviceDecomposition.getServiceInstance().setInstanceId(serviceInstanceId)
+
+ String serviceInstanceName = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName")
+ serviceDecomposition.getServiceInstance().setInstanceName(serviceInstanceName)
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+ execution.setVariable("serviceDecomposition", serviceDecomposition)
+ execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonString())
+ msoLogger.debug("serviceDecomposition.serviceInstanceName: " + serviceDecomposition.getServiceInstance().getInstanceName())
+
+ msoLogger.trace("Completed prepareCreateServiceInstance of CreateGenericALaCarteServiceInstance ***** ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericALaCarteServiceInstance flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("prepareCompletion *** ")
+
+ try {
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <status-message>Service Instance was created successfully.</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>CreateGenericALaCarteServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit prepareCompletionRequest")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("prepareFalloutRequest")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.debug("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in CreateGenericALaCarteServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("Exit prepareFalloutRequest")
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
new file mode 100644
index 0000000000..d665de2ba7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
@@ -0,0 +1,455 @@
+/*-
+ * ============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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>CreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class CreateNetworkInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateNetworkInstance.class);
+
+ String Prefix="CRENI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public InitializeProcessVariables(DelegateExecution execution){
+
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ execution.setVariable(Prefix + "FalloutHandlerRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Start preProcessRequest")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null || sdncVersion == '1610') {
+ // 'a-la-cart' default, sdncVersion = '1610'
+ execution.setVariable("sdncVersion", "1610")
+ String bpmnRequest = execution.getVariable("bpmnRequest")
+ // set 'disableRollback'
+ if (bpmnRequest != null) {
+ String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback")
+ if (disableRollback != null) {
+ execution.setVariable("disableRollback", disableRollback)
+ msoLogger.debug("Received 'suppressRollback': " + disableRollback )
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ msoLogger.debug(" Set 'disableRollback' : " + execution.getVariable("disableRollback") )
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' TEST ONLY, sdncVersion = '1702'
+ msoLogger.debug(" 'disableRollback' : " + execution.getVariable("disableRollback") )
+ }
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // get/set 'requestId'
+ if (execution.getVariable("requestId") == null) {
+ execution.setVariable("requestId", requestId)
+ }
+
+ //Place holder for additional code.
+
+ // TODO ???
+ // userParams??? 1) pre-loads indicator, 2) 'auto-activation'
+ // Tag/Value parameters
+ //
+ // Map: 'networkInputParams': 'auto-activation''
+ // Sample format?
+ // "requestParameters": {
+ // "userParams": [
+ // {
+ // "name": "someUserParam1",
+ // "value": "someValue1"
+ // }
+ // ]
+ // }
+ //
+ // String userParams = //use json util to extract "userParams"//
+ // execution.setVariable("networkInputParams", userParams)
+ // else: execution.setVariable("networkInputParams", null)
+ //
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in CreateNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Start sendSyncResponse")
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug(" sendSyncResponse to APIH - " + "\n" + createNetworkRestRequest)
+ sendWorkflowResponse(execution, 202, createNetworkRestRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void getNetworkModelInfo (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Start getNetworkModelInfo")
+
+ try {
+
+ // For Ala-Carte (sdnc = 1610):
+ // 1. the Network ModelInfo is expected to be sent
+ // via requestDetails.modelInfo (modelType = network).
+ // 2. the Service ModelInfo is expected to be sent but will be IGNORE
+ // via requestDetails.relatedInstanceList.relatedInstance.modelInfo (modelType = service)
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Start sendSyncError")
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+
+ // REST Error (for API Handler (APIH) Reply Task)
+ String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 500, syncError)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Bpmn error encountered in CreateNetworkInstance flow. sendSyncError() - " + ex.getMessage())
+ }
+
+ }
+
+ public void prepareDBRequestError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try {
+ msoLogger.trace("Start prepareDBRequestError")
+
+ // set DB Header Authorization
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+
+ String statusMessage = ""
+ WorkflowException wfe = null
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ wfe = execution.getVariable("WorkflowException")
+ statusMessage = wfe.getErrorMessage()
+ }
+
+ String requestId = execution.getVariable(Prefix + "requestId")
+ String networkName = execution.getVariable("networkName") !=null ? execution.getVariable("networkName") : ""
+ String networkId = execution.getVariable("networkId") !=null ? execution.getVariable("networkId") : ""
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;${MsoUtils.xmlEscape(networkId)}&lt;/network-id&gt;&lt;network-name&gt;${MsoUtils.xmlEscape(networkName)}&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "createDBRequest", dbRequest)
+ msoLogger.debug(" DB Adapter Request - " + "\n" + dbRequest)
+ msoLogger.debug(dbRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareDBRequestError() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Start prepareCompletion")
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ // normal path
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Start postProcessResponse")
+
+ try {
+
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ msoLogger.trace("CreateNetworkInstance Success ****")
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ msoLogger.trace("CreateNetworkInstance Failed in CompletionMsoProces flow!. ****")
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processRollbackData (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Start processRollbackData")
+
+ try {
+ //execution.getVariable("orchestrationStatus")
+ //execution.getVariable("networkId")
+ //execution.getVariable("networkName")
+ //networkOutputParams
+ //rollbackData
+ //rolledBack
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Bpmn error encountered in CreateNetworkInstance flow. callDBCatalog() - " + ex.getMessage())
+ }
+
+ }
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug("DB updateInfraRequest ResponseCode: " + execution.getVariable(Prefix + "dbReturnCode"))
+ msoLogger.debug("DB updateInfraRequest Response: " + execution.getVariable(Prefix + "createDBResponse"))
+
+ msoLogger.trace("Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler.")
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("mso-request-id")
+
+ try {
+
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String errorCode = String.valueOf(wfe.getErrorCode())
+ String errorMessage = wfe.getErrorMessage()
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ msoLogger.debug(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.debug(" Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest)
+
+ } catch (Exception ex) {
+ String errorException = " Bpmn error encountered in CreateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse()"
+ msoLogger.debug("Exception error in CreateNetworkInstance flow, buildErrorResponse(): " + ex.getMessage())
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.debug(" Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest)
+
+ }
+
+ }
+
+ public void processJavaException(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
new file mode 100644
index 0000000000..1c0975f8c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -0,0 +1,327 @@
+/*-
+ * ============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 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.json.JSONObject
+import org.json.XML;
+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.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>CreateSDNCCNetworkResource.bpmn</class> process.
+ * flow for SDNC Network Resource Create
+ */
+public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateSDNCNetworkResource.class);
+
+ String Prefix="CRESDNCRES_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest(DelegateExecution execution){
+ msoLogger.trace("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)
+
+ //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")
+ }
+
+
+ //For sdnc, generate svc_action and request_action
+ String sdnc_svcAction = "create"
+ if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){
+ //This will be resolved in R3.
+ sdnc_svcAction ="activate"
+ operationType = "NCINetwork"
+ }
+ if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){
+ //This will be resolved in R3.
+ operationType ="Network"
+ }
+ String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
+ execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
+ execution.setVariable(Prefix + "requestAction", sdnc_requestAction)
+ 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){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ 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();
+ }
+
+ /**
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ * generate the nsParameters
+ */
+ public void prepareSDNCRequest (DelegateExecution execution) {
+ msoLogger.trace("Started prepareSDNCRequest ")
+
+ try {
+ // get variables
+ String sdnc_svcAction = execution.getVariable(Prefix + "svcAction")
+ String sdnc_requestAction = execution.getVariable(Prefix + "requestAction")
+ 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.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>
+ <network-information>
+ <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>
+ <network-request-input>
+ <network-input-parameters>${MsoUtils.xmlEscape(netowrkInputParameters)}</network-input-parameters>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ msoLogger.debug(sndcTopologyCreateRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
+ msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyCreateRequesAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ msoLogger.trace("Exit prepareSDNCRequest ")
+ }
+
+ 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) {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = "20"
+ String status = "processing"
+ String statusDescription = "SDCN resource creation invoked"
+
+ execution.getVariable("operationId")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${MsoUtils.xmlEscape(operType)}</operType>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${MsoUtils.xmlEscape(ServiceInstanceId)}</serviceId>
+ <status>${MsoUtils.xmlEscape(status)}</status>
+ <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+
+ setProgressUpdateVariables(execution, body)
+
+ }
+
+ public void prepareUpdateAfterCreateSDNCResource(execution) {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = "100"
+ String status = "finished"
+ String statusDescription = "SDCN resource creation completed"
+
+ execution.getVariable("operationId")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${MsoUtils.xmlEscape(operType)}</operType>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${MsoUtils.xmlEscape(ServiceInstanceId)}</serviceId>
+ <status>${MsoUtils.xmlEscape(status)}</status>
+ <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+
+ setProgressUpdateVariables(execution, body)
+ }
+
+ public void postCreateSDNCCall(DelegateExecution execution){
+ msoLogger.trace("Started prepareSDNCRequest ")
+ String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
+ String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
+
+ msoLogger.info("response from sdnc, response code :" + responseCode + " response object :" + responseObj)
+ msoLogger.trace("Exit prepareSDNCRequest ")
+ }
+
+ 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/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
new file mode 100644
index 0000000000..26f12831bd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
@@ -0,0 +1,326 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - SO
+ * ================================================================================
+ * 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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+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.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DoCreateVFCNetworkServiceInstance.bpmn</class> process.
+ * flow for VFC Network Service Create
+ */
+public class CreateVFCNSResource extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateVFCNSResource.class);
+
+
+ String vfcUrl = "/vfc/rest/v1/vfcadapter"
+
+ String host = "http://mso.mso.testlab.openecomp.org:8080"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * CreateVFCNSResource
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ * generate the nsParameters
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ JsonUtils jsonUtil = new JsonUtils()
+
+ String msg = ""
+ msoLogger.trace("preProcessRequest() ")
+ try {
+ //deal with nsName and Description
+ String resourceInput = execution.getVariable("resourceInput")
+
+ String resourceParameters = jsonUtil.getJsonValue(resourceInput, "resourceParameters")
+ // get service name
+ String resourceName = jsonUtil.getJsonValue(resourceInput, "resourceInstanceName")
+ execution.setVariable("nsServiceName", resourceName)
+
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ msoLogger.info("nsServiceName:" + resourceName + " nsServiceDescription:" + nsServiceDescription)
+ //deal with operation key
+ String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId")
+ msoLogger.info("globalSubscriberId:" + globalSubscriberId)
+ //set local globalSubscriberId variable
+ execution.setVariable("globalSubscriberId", globalSubscriberId);
+ String serviceType = execution.getVariable("serviceType")
+ msoLogger.info("serviceType:" + serviceType)
+
+ String serviceId = execution.getVariable("serviceInstanceId")
+ msoLogger.info("serviceId:" + serviceId)
+
+ String operationId = jsonUtil.getJsonValue(resourceInput, "operationId")
+ msoLogger.info("serviceType:" + serviceType)
+
+ String nodeTemplateUUID = jsonUtil.getJsonValue(resourceInput, "resourceModelInfo.modelCustomizationUuid")
+ String nsServiceModelUUID = jsonUtil.getJsonValue(resourceParameters, "requestInputs.nsd0_providing_service_uuid")
+ msoLogger.info("nodeTemplateUUID:" + nodeTemplateUUID)
+ /*
+ * segmentInformation needed as a object of segment
+ * {
+ * "domain":"",
+ * "nodeTemplateName":"",
+ * "nodeType":"",
+ * "nsParameters":{
+ * //this is the nsParameters sent to VF-C
+ * }
+ * }
+ */
+ String nsParameters = jsonUtil.getJsonValue(resourceInput, "resourceParameters")
+ msoLogger.info("nsParameters:" + nsParameters)
+ String nsOperationKey = """{
+ "globalSubscriberId":"${globalSubscriberId}",
+ "serviceType":"${serviceType}",
+ "serviceId":"${serviceId}",
+ "operationId":"${operationId}",
+ "nodeTemplateUUID":"${nodeTemplateUUID}"
+ }"""
+ execution.setVariable("nsOperationKey", nsOperationKey);
+ execution.setVariable("nsParameters", nsParameters)
+ execution.setVariable("nsServiceModelUUID", nsServiceModelUUID);
+
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ /**
+ * create NS task
+ */
+ public void createNetworkService(DelegateExecution execution) {
+ msoLogger.trace("createNetworkService ")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String nsServiceModelUUID = execution.getVariable("nsServiceModelUUID");
+ String nsParameters = execution.getVariable("nsParameters");
+ String nsServiceName = execution.getVariable("nsServiceName")
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ String locationConstraints = jsonUtil.getJsonValue(nsParameters, "locationConstraints")
+ String requestInputs = jsonUtil.getJsonValue(nsParameters, "requestInputs")
+ String reqBody ="""{
+ "nsServiceName":"${nsServiceName}",
+ "nsServiceDescription":"${nsServiceDescription}",
+ "nsServiceModelUUID":"${nsServiceModelUUID}",
+ "nsOperationKey":${nsOperationKey},
+ "nsParameters":{
+ "locationConstraints":${locationConstraints},
+ "additionalParamForNs":${requestInputs}
+ }
+ }"""
+ APIResponse apiResponse = postRequest(execution, host + vfcUrl + "/ns", reqBody)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String nsInstanceId = "";
+ if(returnCode== "200" || returnCode == "201"){
+ nsInstanceId = jsonUtil.getJsonValue(aaiResponseAsString, "nsInstanceId")
+ }
+ execution.setVariable("nsInstanceId", nsInstanceId)
+ msoLogger.info(" *****Exit createNetworkService *****")
+ }
+
+ /**
+ * instantiate NS task
+ */
+ public void instantiateNetworkService(DelegateExecution execution) {
+ msoLogger.trace("instantiateNetworkService ")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String nsParameters = execution.getVariable("nsParameters");
+ String nsServiceName = execution.getVariable("nsServiceName")
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ String reqBody ="""{
+ "nsServiceName":"${nsServiceName}",
+ "nsServiceDescription":"${nsServiceDescription}",
+ "nsOperationKey":${nsOperationKey},
+ "nsParameters":${nsParameters}
+ }"""
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ String url = host + vfcUrl + "/ns/" +nsInstanceId + "/instantiate"
+ APIResponse apiResponse = postRequest(execution, url, reqBody)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String jobId = "";
+ if(returnCode== "200"|| returnCode == "201"){
+ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
+ }
+ execution.setVariable("jobId", jobId)
+ msoLogger.info(" *****Exit instantiateNetworkService *****")
+ }
+
+ /**
+ * query NS task
+ */
+ public void queryNSProgress(DelegateExecution execution) {
+ msoLogger.trace("queryNSProgress ")
+ String jobId = execution.getVariable("jobId")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String url = host + vfcUrl + "/jobs/" + jobId
+ APIResponse apiResponse = postRequest(execution, url, nsOperationKey)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String operationStatus = "error"
+ if(returnCode== "200"|| returnCode == "201"){
+ operationStatus = jsonUtil.getJsonValue(aaiResponseAsString, "responseDescriptor.status")
+ }
+ execution.setVariable("operationStatus", operationStatus)
+ msoLogger.info(" *****Exit queryNSProgress *****")
+ }
+
+ /**
+ * delay 5 sec
+ */
+ public void timeDelay(DelegateExecution execution) {
+ try {
+ Thread.sleep(5000);
+ } catch(InterruptedException e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Time Delay exception" + e , "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ }
+ }
+
+ /**
+ * finish NS task
+ */
+ public void addNSRelationship(DelegateExecution execution) {
+ msoLogger.trace("addNSRelationship ")
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ if(nsInstanceId == null || nsInstanceId == ""){
+ msoLogger.info(" create NS failed, so do not need to add relationship")
+ return
+ }
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String addRelationPayload = """<relationship xmlns="http://org.openecomp.aai.inventory/v11">
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(globalSubscriberId)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(serviceType)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(nsInstanceId)}</relationship-value>
+ </relationship-data>
+ </relationship>"""
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ msoLogger.info("Add Relationship req:\n" + addRelationPayload)
+ String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship"
+ APIResponse aaiRsp = executeAAIPutCall(execution, url, addRelationPayload)
+ msoLogger.info("aai response status code:" + aaiRsp.getStatusCode())
+ msoLogger.info("aai response content:" + aaiRsp.getResponseBodyAsString())
+ msoLogger.info(" *****Exit addNSRelationship *****")
+ }
+
+ public APIResponse executeAAIPutCall(DelegateExecution execution, String url, String payload){
+ msoLogger.trace("Started Execute AAI Put Process ")
+ APIResponse apiResponse = null
+ try{
+ String uuid = utils.getRequestID()
+ msoLogger.info("Generated uuid is: " + uuid)
+ msoLogger.info("URL to be used is: " + url)
+ String userName = execution.getVariable("URN_aai_auth")
+ String password = execution.getVariable("URN_mso_msoKey")
+ String basicAuthCred = utils.getBasicAuth(userName,password)
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/xml").addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ apiResponse = client.httpPut(payload)
+ msoLogger.trace("Completed Execute AAI Put Process ")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing AAI Put Call.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ /**
+ * post request
+ * url: the url of the request
+ * requestBody: the body of the request
+ */
+ private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){
+ msoLogger.trace("Started Execute VFC adapter Post Process ")
+ msoLogger.info("url:"+url +"\nrequestBody:"+ requestBody)
+ APIResponse apiResponse = null
+ try{
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Accept","application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk");
+ apiResponse = client.httpPost(requestBody)
+ msoLogger.info("response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString())
+ msoLogger.trace("Completed Execute VF-C adapter Post Process ")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing AAI Post Call.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String operationStatus = execution.getVariable("operationStatus")
+ // 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/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
new file mode 100644
index 0000000000..308c93540f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -0,0 +1,620 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.v12.GenericVnf;
+import org.onap.appc.client.lcm.model.Action
+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.common.scripts.SDNCAdapterUtils;
+import org.onap.so.bpmn.core.RollbackData
+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.bpmn.infrastructure.aai.AAICreateResources;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateVfModuleInfra.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public SDNCAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.debug('Started ' + method)
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+ execution.setVariable("CVFMI_sentSyncResponse", false)
+
+ def prefix = 'CVFMI_'
+ execution.setVariable('prefix', prefix)
+ execution.setVariable("isVidRequest", "false")
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+ execution.setVariable("RollbackData", rollbackData)
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ msoLogger.debug("CreateVfModule Infra incoming Request: " + incomingRequest)
+
+ setBasicDBAuthHeader(execution, isDebugLogEnabled)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ execution.setVariable(prefix + 'serviceInstanceId', serviceInstanceId)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+
+ def vnfName = ''
+ def asdcServiceModelVersion = ''
+ def serviceModelInfo = null
+ def vnfModelInfo = null
+
+ def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+
+ }
+ if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+ vnfName = it.relatedInstance.instanceName ?: ''
+ vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ }
+ }
+ }
+
+ execution.setVariable(prefix + 'vnfName', vnfName)
+ execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion)
+ execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo)
+ execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo)
+
+
+ def vnfType = execution.getVariable('vnfType')
+ execution.setVariable(prefix + 'vnfType', vnfType)
+ def vfModuleId = execution.getVariable('vfModuleId')
+ execution.setVariable(prefix + 'vfModuleId', vfModuleId)
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ execution.setVariable(prefix + 'volumeGroupId', volumeGroupId)
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> userParamsMap = [:]
+ if (userParams != null) {
+ userParams.each { userParam ->
+ userParamsMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug('Processed user params: ' + userParamsMap)
+
+ execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap)
+
+ def isBaseVfModule = "false"
+ if (execution.getVariable('isBaseVfModule') == true) {
+ isBaseVfModule = "true"
+ }
+
+ execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule)
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable(prefix + 'requestId', requestId)
+
+ def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
+ execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo)
+
+ def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback
+
+
+ def backoutOnFailure = ""
+ if(suppressRollback != null){
+ if ( suppressRollback == true) {
+ backoutOnFailure = "false"
+ } else if ( suppressRollback == false) {
+ backoutOnFailure = "true"
+ }
+ }
+
+ execution.setVariable('disableRollback', suppressRollback)
+
+ def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
+ execution.setVariable(prefix + 'vfModuleName', vfModuleName)
+
+ def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: ''
+ execution.setVariable(prefix + 'serviceId', serviceId)
+
+ def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
+ execution.setVariable(prefix + 'usePreload', usePreload)
+
+ // This is aLaCarte flow, so aLaCarte flag is always on
+ execution.setVariable(prefix + 'aLaCarte', true)
+
+ def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
+ def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId
+ execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = cloudConfiguration.tenantId
+ execution.setVariable(prefix + 'tenantId', tenantId)
+
+ def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
+ execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId)
+
+ execution.setVariable(prefix + 'sdncVersion', '1702')
+
+ execution.setVariable("CreateVfModuleInfraSuccessIndicator", false)
+ execution.setVariable("RollbackCompleted", false)
+
+ execution.setVariable("isDebugLogEnabled", isDebugLogEnabled)
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable("CVFMI_source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("CVFMI_requestInfo", requestInfo)
+
+ //backoutOnFailure
+
+ execution.setVariable("CVFMI_originalWorkflowException", null)
+
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("newVfModuleId", newVfModuleId)
+ execution.setVariable(prefix + 'vfModuleId', newVfModuleId)
+ execution.setVariable('actionHealthCheck', Action.HealthCheck)
+ execution.setVariable('actionConfigScaleOut', Action.ConfigScaleOut)
+ execution.setVariable('controllerType', "APPC")
+ def controllerType = execution.getVariable('controllerType')
+ execution.setVariable(prefix + 'controllerType', controllerType)
+ execution.setVariable('healthCheckIndex0', 0)
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"))
+
+ msoLogger.debug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"))
+
+ msoLogger.trace('Finished ' + method)
+ } catch (BpmnError bpmnError) {
+ throw bpmnError
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug("Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
+ //execution.setVariable("CVFMODVOL2_isDataOk", false)
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
+ }
+
+ }
+
+ /**
+ * Validates a workflow response.
+ * @param execution the execution
+ * @param responseVar the execution variable in which the response is stored
+ * @param responseCodeVar the execution variable in which the response code is stored
+ * @param errorResponseVar the execution variable in which the error response is stored
+ */
+ public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
+ String responseCodeVar, String errorResponseVar) {
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+ }
+
+
+ /**
+ * Sends the empty, synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Started ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('CVFMI_requestInfo')
+ def requestId = execution.getVariable('CVFMI_requestId')
+ def source = execution.getVariable('CVFMI_source')
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def newVfModuleId = execution.getVariable("newVfModuleId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ execution.setVariable("CVFMI_sentSyncResponse", true)
+ msoLogger.debug("CreateVfModule Infra Response: " + synchResponse)
+ msoLogger.trace('Finished ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered ", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Query AAI for vnf orchestration status to determine if health check and config scaling should be run
+ */
+ public void queryAAIForVnfOrchestrationStatus(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ def vnfId = execution.getVariable("CVFMI_vnfId")
+ execution.setVariable("runHealthCheck", false);
+ execution.setVariable("runConfigScaleOut", false);
+ AAICreateResources aaiCreateResources = new AAICreateResources();
+ Optional<GenericVnf> vnf = aaiCreateResources.getVnfInstance(vnfId);
+ if(vnf.isPresent()){
+ def vnfOrchestrationStatus = vnf.get().getOrchestrationStatus();
+ if("active".equalsIgnoreCase(vnfOrchestrationStatus)){
+ execution.setVariable("runHealthCheck", false);
+ execution.setVariable("runConfigScaleOut", true);
+ }
+ }
+ }
+
+ /**
+ * Retrieve data for ConfigScaleOut from SDNC topology
+ */
+
+ public void retreiveConfigScaleOutData(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ def vfModuleId = execution.getVariable("CVFMI_vfModuleId")
+ String ipAddress = "";
+ String oamIpAddress = "";
+ String vnfHostIpAddress = "";
+
+ String vnfGetSDNC = execution.getVariable("DCVFM_getSDNCAdapterResponse");
+
+ String data = utils.getNodeXml(vnfGetSDNC, "response-data")
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+
+ InputSource source = new InputSource(new StringReader(data));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document responseXml = docBuilder.parse(source)
+
+ NodeList paramsList = responseXml.getElementsByTagNameNS("*", "vnf-parameters")
+ for (int z = 0; z < paramsList.getLength(); z++) {
+ Node node = paramsList.item(z)
+ Element eElement = (Element) node
+ String vnfParameterName = utils.getElementText(eElement, "vnf-parameter-name")
+ String vnfParameterValue = utils.getElementText(eElement, "vnf-parameter-value")
+ if (vnfParameterName.equals("vlb_private_ip_1")) {
+ vnfHostIpAddress = vnfParameterValue
+ }
+ else if (vnfParameterName.equals("vdns_private_ip_0")) {
+ ipAddress = vnfParameterValue
+ }
+ else if (vnfParameterName.equals("vdns_private_ip_1")) {
+ oamIpAddress = vnfParameterValue
+ }
+ }
+
+ String payload = "{\"request-parameters\":{\"vnf-host-ip-address\":\"" + vnfHostIpAddress + "\",\"vf-module-id\":\"" + vfModuleId + "\"},\"configuration-parameters\":{\"ip-addr\":\"" + ipAddress +"\", \"oam-ip-addr\":\""+ oamIpAddress +"\",\"enabled\":\"true\"}}"
+ execution.setVariable("payload", payload);
+ }
+
+ /**
+ *
+ * @param execution the execution
+ */
+ public void postProcessResponse(DelegateExecution execution){
+ msoLogger.trace("STARTED PostProcessResponse Process")
+ try{
+ def requestInfo = execution.getVariable("CVFMI_requestInfo")
+ def action = utils.getNodeText(requestInfo, "action")
+
+ msoLogger.debug("requestInfo is: " + requestInfo)
+ msoLogger.debug("action is: " + action)
+
+ String payload =
+ """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:ns8="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
+ <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_SuccessFlag", true)
+ execution.setVariable("CVFMI_msoCompletionRequest", payload)
+ msoLogger.debug("CreateVfModuleInfra completion request: " + payload)
+ msoLogger.debug("Outgoing MsoCompletionRequest: \n" + payload)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Occured Processing PostProcessResponse - " + "\n", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED PostProcessResponse Process")
+ }
+
+
+
+
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Started ' + method)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ if (prefix == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
+ }
+
+ try {
+ def request = execution.getVariable(prefix + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable(processKey + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable('bpmnRequest')
+ }
+
+ setVariable(execution, processKey + 'Request', null);
+ setVariable(execution, 'bpmnRequest', null);
+ setVariable(execution, prefix + 'Request', request);
+ }
+
+ if (request == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
+ }
+
+ /*
+
+ def requestId = execution.getVariable("mso-request-id")
+
+ if (requestId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
+ }
+
+ utils.logContext(requestId, serviceInstanceId)
+ */
+ msoLogger.debug("CreateVfModule incoming request: " + request)
+ msoLogger.debug('Incoming message: ' + System.lineSeparator() + request)
+ msoLogger.trace('Finished ' + method)
+ return request
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Caught exception in " + method , "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+ public void prepareUpdateInfraRequest(DelegateExecution execution){
+ msoLogger.trace("STARTED prepareUpdateInfraRequest Process")
+ try{
+
+ String requestInfo = execution.getVariable("CVFMI_requestInfo")
+ def aicCloudRegion = execution.getVariable("CVFMI_lcpCloudRegionId")
+ def tenantId = execution.getVariable("CVFMI_tenantId")
+ def requestId = utils.getNodeText(requestInfo, "request-id")
+ def vnfId = execution.getVariable("CVFMI_vnfId")
+ def vfModuleId = execution.getVariable("CVFMI_vfModuleId")
+ // vfModuleName may be generated by DoCreateVfModule subprocess if it is not specified on the input
+ def vfModuleName = execution.getVariable("CVFMI_vfModuleName")
+
+ def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint",execution)
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ msoLogger.debug("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>VF Module successfully created</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;vnf-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${MsoUtils.xmlEscape(vnfId)}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${MsoUtils.xmlEscape(vfModuleId)}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vfModuleName>${MsoUtils.xmlEscape(vfModuleName)}</vfModuleName>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateInfraRequest", payload)
+ msoLogger.debug("Outgoing UpdateInfraRequest: \n" + payload)
+ msoLogger.debug("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing prepareUpdateInfraRequest.", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED prepareUpdateInfraRequest Process")
+ }
+
+ /**
+ * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace("Started " + method)
+
+
+ try {
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def requestInformation = execution.getVariable("CVFMI_requestInfo")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInformation}
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>
+ """
+
+ msoLogger.debug("CONTENT before translation: " + content)
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ msoLogger.debug("CreateVfModuleInfra FallOutHander Request: " + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Caught exception in " + method , "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ public void logAndSaveOriginalException(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ logWorkflowException(execution, 'CreateVfModuleInfra caught an event')
+ saveWorkflowException(execution, 'CVFMI_originalWorkflowException')
+ }
+
+ public void validateRollbackResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+ def originalException = execution.getVariable("CVFMI_originalWorkflowException")
+ execution.setVariable("WorkflowException", originalException)
+
+ execution.setVariable("RollbackCompleted", true)
+
+ }
+
+ public void sendErrorResponse(DelegateExecution execution){
+ msoLogger.trace("STARTED CreateVfModulenfra sendErrorResponse Process")
+ try {
+ def sentSyncResponse = execution.getVariable("CVFMI_sentSyncResponse")
+ if(sentSyncResponse == false){
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String response = exceptionUtil.buildErrorResponseXml(wfex)
+ msoLogger.debug(response)
+ sendWorkflowResponse(execution, 500, response)
+ }else{
+ msoLogger.debug("Not Sending Error Response. Sync Response Already Sent")
+ }
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in CreateVfModuleInfra sendErrorResponse Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVfModuleInfra sendErrorResponse Process")
+ }
+ msoLogger.trace("COMPLETED CreateVfModuleInfra sendErrorResponse Process")
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000000..aa569655f4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,356 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+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.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateVfModuleVolumeInfraV1.class);
+ public static final String prefix='CVMVINFRAV1_'
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void preProcessRequest (DelegateExecution execution, isDebugEnabled) {
+
+ execution.setVariable("prefix",prefix)
+ setSuccessIndicator(execution, false)
+ execution.setVariable(prefix+'syncResponseSent', false)
+
+ String createVolumeIncoming = validateRequest(execution, 'vnfId')
+ msoLogger.debug(createVolumeIncoming)
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+ setupVariables(execution, reqMap, isDebugEnabled)
+ msoLogger.debug("XML request:\n" + createVolumeIncoming)
+ }
+ catch(groovy.json.JsonException je) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'Request is not a valid JSON document')
+ }
+
+ // For rollback in this flow
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+ setRollbackEnabled(execution, isDebugEnabled)
+ }
+
+
+ /**
+ * Set up variables that will be passed to the BB DoCreatevfModuleVolume flow
+ * @param execution
+ * @param requestMap
+ * @param serviceInstanceId
+ * @param isDebugLogEnabled
+ */
+ public void setupVariables(DelegateExecution execution, Map requestMap, isDebugLogEnabled) {
+
+ def jsonOutput = new JsonOutput()
+
+ // volumeGroupId - is generated
+ String volumeGroupId = UUID.randomUUID()
+ execution.setVariable('volumeGroupId', volumeGroupId)
+ msoLogger.debug("Generated volumeGroupId: " + volumeGroupId)
+
+ // volumeGroupName
+ def volGrpName = requestMap.requestDetails.requestInfo?.instanceName ?: ''
+ execution.setVariable('volumeGroupName', volGrpName)
+
+ // vfModuleModelInfo
+ def vfModuleModelInfo = jsonOutput.toJson(requestMap.requestDetails?.modelInfo)
+ execution.setVariable('vfModuleModelInfo', vfModuleModelInfo)
+
+ // lcpCloudRegonId
+ def lcpCloudRegionId = requestMap.requestDetails.cloudConfiguration.lcpCloudRegionId
+ execution.setVariable('lcpCloudRegionId', lcpCloudRegionId)
+
+ // tenant
+ def tenantId = requestMap.requestDetails.cloudConfiguration.tenantId
+ execution.setVariable('tenantId', tenantId)
+
+ // source
+ def source = requestMap.requestDetails.requestInfo.source
+ execution.setVariable(prefix+'source', source)
+
+ // vnfType and asdcServiceModelVersion
+
+ def serviceName = ''
+ def asdcServiceModelVersion = ''
+ def modelCustomizationName = ''
+
+ def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ serviceName = it.relatedInstance.modelInfo?.modelName
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ }
+ if (it.relatedInstance.modelInfo?.modelType == 'vnf') {
+ modelCustomizationName = it.relatedInstance.modelInfo?.modelCustomizationName
+ }
+ }
+
+ def vnfType = serviceName + '/' + modelCustomizationName
+ execution.setVariable('vnfType', vnfType)
+ execution.setVariable('asdcServiceModelVersion', asdcServiceModelVersion)
+
+ // vfModuleInputParams
+ def userParams = requestMap.requestDetails?.requestParameters?.userParams
+ Map<String, String> vfModuleInputMap = [:]
+
+ userParams.each { userParam ->
+ vfModuleInputMap.put(userParam.name, userParam.value.toString())
+ }
+ execution.setVariable('vfModuleInputParams', vfModuleInputMap)
+
+ // disableRollback (true or false)
+ def disableRollback = requestMap.requestDetails.requestInfo.suppressRollback
+ execution.setVariable('disableRollback', disableRollback)
+ msoLogger.debug('disableRollback (suppressRollback) from request: ' + disableRollback)
+
+ }
+
+
+
+ public void sendSyncResponse (DelegateExecution execution, isDebugEnabled) {
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def requestId = execution.getVariable("mso-request-id")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug("Sync Response: " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 200, syncResponse)
+
+ execution.setVariable(prefix+'syncResponseSent', true)
+ }
+
+
+ public void sendSyncError (DelegateExecution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+ //default to 400 since only invalid request will trigger this method
+ sendWorkflowResponse(execution, 400, errorMessage)
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void buildWorkflowException(DelegateExecution execution, int errorCode, errorMessage, isDebugEnabled) {
+ msoLogger.debug(errorMessage)
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+ }
+
+
+ /**
+ * Build Infra DB Request
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void prepareDbInfraSuccessRequest(DelegateExecution execution, isDebugEnabled) {
+ def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+ def requestId = execution.getVariable('mso-request-id')
+ def statusMessage = "VolumeGroup successfully created."
+ def requestStatus = "COMPLETED"
+ def progress = "100"
+
+ /*
+ from: $gVolumeGroup/aai:volume-group-id/text()
+ to: vnfreq:volume-outputs/vnfreq:volume-group-id
+ */
+ // for now assume, generated volumeGroupId is accepted
+ def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>${MsoUtils.xmlEscape(requestStatus)}</requestStatus>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <vnfOutputs>${MsoUtils.xmlEscape(dbVnfOutputs)}</vnfOutputs>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable(prefix+"createDBRequest", buildDBRequestAsString)
+ msoLogger.debug("DB Infra Request: " + buildDBRequestAsString)
+ }
+
+
+ /**
+ * Build CommpleteMsoProcess request
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void postProcessResponse (DelegateExecution execution, isDebugEnabled) {
+
+ def dbReturnCode = execution.getVariable(prefix+'dbReturnCode')
+ def createDBResponse = execution.getVariable(prefix+'createDBResponse')
+
+ msoLogger.debug('DB return code: ' + dbReturnCode)
+ msoLogger.debug('DB response: ' + createDBResponse)
+
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable(prefix+'source')
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable(prefix+'Success', true)
+ execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ }
+
+ public void prepareFalloutHandlerRequest(DelegateExecution execution, isDebugEnabled) {
+
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable(prefix+'source')
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+
+ execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Overall Error Response going to FalloutHandler", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "\n" + xmlHandlerRequest);
+ }
+
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIServiceInstance(DelegateExecution execution, isDebugEnabled) {
+
+ def request = execution.getVariable(prefix+"Request")
+ def serviceInstanceId = utils.getNodeText(request, "service-instance-id")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getSearchNodesQueryEndpoint(execution)
+
+ def String queryAAIRequest = aaiEndpoint + "?search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId
+ msoLogger.debug("AAI query service instance request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query service instance return code: " + returnCode)
+ msoLogger.debug("AAI query service instance response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ msoLogger.debug('Service instance ' + serviceInstanceId + ' found in AAI.')
+ } else {
+ if (returnCode=='404') {
+ def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.'
+ msoLogger.debug(message)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ public void logAndSaveOriginalException(DelegateExecution execution, isDebugLogEnabled) {
+ logWorkflowException(execution, 'CreateVfModuleVolumeInfraV1 caught an event')
+ saveWorkflowException(execution, 'CVMVINFRAV1_originalWorkflowException')
+ }
+
+ public void validateRollbackResponse(DelegateExecution execution, isDebugLogEnabled) {
+
+ def originalException = execution.getVariable("CVMVINFRAV1_originalWorkflowException")
+ execution.setVariable("WorkflowException", originalException)
+ execution.setVariable("RollbackCompleted", true)
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
new file mode 100644
index 0000000000..9c25a57adc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
@@ -0,0 +1,542 @@
+/*-
+ * ============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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils;
+import org.onap.so.bpmn.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+/**
+ * This class supports the CreateVnfInfra Flow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ */
+class CreateVnfInfra extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateVnfInfra.class);
+
+
+ String Prefix="CREVI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ CatalogDbUtils cutils = new CatalogDbUtils()
+ AAICreateResources aaiCR = new AAICreateResources()
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED CreateVnfInfra PreProcessRequest Process")
+
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+ execution.setVariable("CREVI_sentSyncResponse", false)
+
+ try{
+ // Get Variables
+ String createVnfRequest = execution.getVariable("bpmnRequest")
+ execution.setVariable("CREVI_createVnfRequest", createVnfRequest)
+ msoLogger.debug("Incoming CreateVnfInfra Request is: \n" + createVnfRequest)
+
+ if(createVnfRequest != null){
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("CREVI_requestId", requestId)
+ msoLogger.debug("Incoming Request Id is: " + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("CREVI_serviceInstanceId", serviceInstanceId)
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("CREVI_vnfType", vnfType)
+ msoLogger.debug("Incoming Vnf Type is: " + vnfType)
+
+ String vnfName = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ msoLogger.debug("Incoming Vnf Name is: " + vnfName)
+
+ String serviceId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("CREVI_serviceId", serviceId)
+ msoLogger.debug("Incoming Service Id is: " + serviceId)
+
+ String source = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("CREVI_source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ String suppressRollback = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("CREVI_suppressRollback", suppressRollback)
+ msoLogger.debug("Incoming Suppress Rollback is: " + suppressRollback)
+
+ def vnfModelInfo = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("CREVI_vnfModelInfo", vnfModelInfo)
+
+ String modelInvariantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelInvariantUuid")
+ execution.setVariable("CREVI_modelInvariantId", modelInvariantId)
+ msoLogger.debug("Incoming Invariant Id is: " + modelInvariantId)
+
+ String modelVersion = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelVersion")
+ execution.setVariable("CREVI_modelVersion", modelVersion)
+ msoLogger.debug("Incoming Model Version is: " + modelVersion)
+
+ def cloudConfiguration = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("CREVI_cloudConfiguration", cloudConfiguration)
+
+ String cloudSiteId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("CREVI_cloudSiteId", cloudSiteId)
+ msoLogger.debug("Incoming Cloud Site Id is: " + cloudSiteId)
+
+ String tenantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("CREVI_tenantId", tenantId)
+ msoLogger.debug("Incoming Tenant Id is: " + tenantId)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("CREVI_requestInfo", requestInfo)
+
+ //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+ String orchStatus = "Created"
+ execution.setVariable("CREVI_orchStatus", orchStatus)
+
+ //TODO: Equipment Role - Should come from SDN-C Response in 1702
+ String equipmentRole = " "
+ execution.setVariable("CREVI_equipmentRole", equipmentRole)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = UUID.randomUUID().toString()
+ msoLogger.debug("Generated Vnf Id is: " + vnfId)
+ }
+ execution.setVariable("CREVI_vnfId", vnfId)
+
+ // Setting for Sub Flow Calls
+ execution.setVariable("CREVI_type", "generic-vnf")
+ execution.setVariable("GENGS_type", "service-instance")
+
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError);
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("CREVI_sdncCallbackUrl", sdncCallbackUrl)
+
+ def vnfInputParameters = null
+ try {
+ vnfInputParameters = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestParameters.userParams")
+ }
+ catch (Exception e) {
+ msoLogger.debug("userParams are not present in the request")
+ }
+ execution.setVariable("CREVI_vnfInputParameters", vnfInputParameters)
+
+
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error Occurred in CreateVnfInfra PreProcessRequest method", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in CreateVnfInfra PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED CreateVnfInfra PreProcessRequest Process")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED CreateVnfInfra SendSyncResponse Process")
+
+ try {
+ String requestId = execution.getVariable("CREVI_requestId")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+
+ String createVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug("CreateVnfInfra Sync Response is: \n" + createVnfResponse)
+
+ sendWorkflowResponse(execution, 202, createVnfResponse)
+
+ execution.setVariable("CREVI_sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error Occurred in CreateVnfInfra SendSyncResponse Process", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
+
+ }
+ msoLogger.trace("COMPLETED CreateVnfInfra SendSyncResponse Process")
+ }
+
+
+ public void preProcessSDNCAssignRequest(DelegateExecution execution){
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCAssignRequest")
+ def vnfId = execution.getVariable("CREVI_vnfId")
+ def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+ msoLogger.debug("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("CREVI_assignSDNCRequest", assignSDNCRequest)
+ msoLogger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCAssignRequest")
+ }
+
+ public void preProcessSDNCActivateRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCActivateRequest Process")
+ try{
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ String serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("CREVI_activateSDNCRequest", activateSDNCRequest)
+ msoLogger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCActivateRequest", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCActivateRequest Process")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("CREVI_sdncCallbackUrl")
+ def requestId = execution.getVariable("CREVI_requestId")
+ def serviceId = execution.getVariable("CREVI_serviceId")
+ def vnfType = execution.getVariable("CREVI_vnfType")
+ def vnfName = execution.getVariable("CREVI_vnfName")
+ def tenantId = execution.getVariable("CREVI_tenantId")
+ def source = execution.getVariable("CREVI_source")
+ def vnfId = execution.getVariable("CREVI_vnfId")
+ def cloudSiteId = execution.getVariable("CREVI_cloudSiteId")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("CREVI_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(requestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(svcInstId)}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-name>${MsoUtils.xmlEscape(vnfName)}</vnf-name>
+ <vnf-type>${MsoUtils.xmlEscape(vnfType)}</vnf-type>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ msoLogger.debug("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.trace("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+ }
+
+ public void prepareCompletionHandlerRequest(DelegateExecution execution){
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED CreateVnfInfra PrepareCompletionHandlerRequest Process")
+
+ try {
+ String requestInfo = execution.getVariable("CREVI_requestInfo")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+
+ String request =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <status-message>Vnf has been created successfully.</status-message>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <mso-bpel-name>CreateVnfInfra</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ execution.setVariable("CREVI_completionHandlerRequest", request)
+ msoLogger.debug("Completion Handler Request is: " + request)
+
+ execution.setVariable("WorkflowResponse", "Success") // for junits
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process")
+
+ }
+ msoLogger.trace("COMPLETED CreateVnfInfra PrepareCompletionHandlerRequest Process")
+ }
+
+ public void sendErrorResponse(DelegateExecution execution){
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED CreateVnfInfra sendErrorResponse Process")
+ try {
+ def sentSyncResponse = execution.getVariable("CREVI_sentSyncResponse")
+ if(sentSyncResponse == false){
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+ msoLogger.debug(response)
+ sendWorkflowResponse(execution, 500, response)
+ }else{
+ msoLogger.debug("Not Sending Error Response. Sync Response Already Sent")
+ }
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in CreateVnfInfra sendErrorResponse Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra sendErrorResponse Process")
+
+ }
+ msoLogger.trace("COMPLETED CreateVnfInfra sendErrorResponse Process")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED CreateVnfInfra prepareFalloutRequest Process")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Incoming Workflow Exception: " + wfex.toString())
+ String requestInfo = execution.getVariable("CREVI_requestInfo")
+ msoLogger.debug(" Incoming Request Info: " + requestInfo)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("CREVI_falloutRequest", falloutRequest)
+
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in CreateVnfInfra prepareFalloutRequest Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra prepareFalloutRequest Process")
+
+ }
+ msoLogger.trace("COMPLETED CreateVnfInfra prepareFalloutRequest Process")
+ }
+
+
+ public void queryCatalogDB (DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED CreateVnfInfra QueryCatalogDB Process")
+ try {
+ //Get Vnf Info
+ String vnfModelInfo = execution.getVariable("CREVI_vnfModelInfo")
+ String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationUuid")
+ msoLogger.debug("querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+
+ JSONArray vnfs = cutils.getAllVnfsByVnfModelCustomizationUuid(execution,
+ vnfModelCustomizationUuid, "v2")
+ msoLogger.debug("obtained VNF list: " + vnfs)
+
+ if (vnfs == null) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
+ }
+
+ // Only one match here
+ JSONObject vnf = vnfs.get(0)
+
+ if (vnf == null) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
+ }
+
+ VnfResource vnfResource = new VnfResource()
+ String nfType = jsonUtil.getJsonValueForKey(vnf, "nfType")
+ vnfResource.setNfType(nfType)
+ String nfRole = jsonUtil.getJsonValueForKey(vnf, "nfRole")
+ vnfResource.setNfRole(nfRole)
+ String nfFunction = jsonUtil.getJsonValueForKey(vnf, "nfFunction")
+ vnfResource.setNfFunction(nfFunction)
+ String nfNamingCode = jsonUtil.getJsonValueForKey(vnf, "nfNamingCode")
+ vnfResource.setNfNamingCode(nfNamingCode)
+
+ execution.setVariable("CREVI_vnfResourceDecomposition", vnfResource)
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch(Exception ex) {
+ msoLogger.debug("Error Occurred in CreateVnfInfra QueryCatalogDB Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in CreateVnfInfra QueryCatalogDB Process")
+ }
+
+
+ msoLogger.trace("COMPLETED CreateVnfInfra QueryCatalogDb Process")
+ }
+ public void createPlatform (DelegateExecution execution) {
+ msoLogger.trace("START createPlatform")
+
+ String request = execution.getVariable("bpmnRequest")
+ String platformName = jsonUtil.getJsonValue(request, "requestDetails.platform.platformName")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+
+ msoLogger.debug("Platform NAME: " + platformName)
+ msoLogger.debug("VnfID: " + vnfId)
+
+ if(platformName == null||platformName.equals("")){
+ String msg = "Exception in createPlatform. platformName was not found in the request.";
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }else{
+ msoLogger.debug("platformName was found.")
+ try{
+ AAICreateResources aaiCR = new AAICreateResources()
+ aaiCR.createAAIPlatform(platformName, vnfId)
+ }catch(Exception ex){
+ String msg = "Exception in createPlatform. " + ex.getMessage();
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+ msoLogger.trace("Exit createPlatform")
+ }
+ public void createLineOfBusiness (DelegateExecution execution) {
+ msoLogger.trace("START createLineOfBusiness")
+
+ String request = execution.getVariable("bpmnRequest")
+ String lineOfBusiness = jsonUtil.getJsonValue(request, "requestDetails.lineOfBusiness.lineOfBusinessName")
+ String vnfId = execution.getVariable("CREVI_vnfId")
+
+ msoLogger.debug("LineOfBusiness NAME: " + lineOfBusiness)
+ msoLogger.debug("VnfID: " + vnfId)
+
+ if(lineOfBusiness == null || lineOfBusiness.equals("")){
+ msoLogger.debug("LineOfBusiness was not found. Continuing on with flow...")
+ }else{
+ msoLogger.debug("LineOfBusiness was found.")
+ try{
+ AAICreateResources aaiCR = new AAICreateResources()
+ aaiCR.createAAILineOfBusiness(lineOfBusiness, vnfId)
+ }catch(Exception ex){
+ String msg = "Exception in LineOfBusiness. " + ex.getMessage();
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+ msoLogger.trace("Exit createLineOfBusiness")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
new file mode 100644
index 0000000000..cbbc5189f4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
@@ -0,0 +1,386 @@
+/*-
+
+ * ============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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils;
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DelE2EServiceInstance.bpmn</class> process.
+ *
+ */
+public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteCustomE2EServiceInstance.class);
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ msoLogger.info("Starting preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(siRequest)
+
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.info("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+
+ //requestInfo
+// String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+// if (isBlank(productFamilyId))
+// {
+// msg = "Input productFamilyId is null"
+// utils.log("INFO", msg, isDebugEnabled)
+// //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+// } else {
+// execution.setVariable("productFamilyId", productFamilyId)
+// }
+ String source = jsonUtil.getJsonValue(siRequest, "source")
+ execution.setVariable("source", source)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ msoLogger.info(msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "serviceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ msoLogger.debug(msg)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+ String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
+ execution.setVariable("operationId", operationId)
+
+ execution.setVariable("operationType", "DELETE")
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Staring sendSyncResponse")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
+ msoLogger.info("sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.trace("Exit sendSyncResopnse")
+ }
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.info("Starting sendSyncError")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.info(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.info("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Starting prepareCompletion")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>E2E Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DeleteCustomE2EServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ msoLogger.info(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit prepareCompletionRequest")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Starting prepareFalloutRequest ")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.info(" Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.info("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("Exit prepareFalloutRequest")
+ }
+
+
+ // *******************************
+ // Build DB request Section
+ // *******************************
+ public void prepareDBRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ msoLogger.info("Starting prepareDBRequest")
+
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = "E2E Service Instance successfully deleted."
+
+ //TODO - verify the format for Service Instance Delete,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBRequest", buildDeleteDBRequestAsString)
+ msoLogger.info(buildDeleteDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteCustomE2EServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+ public void prepareDBRequestError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Start prepareDBRequestError")
+
+ try {
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ statusMessage = wfe.getErrorMessage()
+
+ } else {
+ statusMessage = "Encountered Error during DeleteCustomE2EServiceInstance proccessing. "
+ }
+
+ //TODO - verify the format for Service Instance Create,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
+ msoLogger.info(buildDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteCustomE2EServiceInstance flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void processJavaException(DelegateExecution execution) {
+ //TODO:
+ }
+
+ /**
+ * Init the service Operation Status
+ */
+ public void prepareInitServiceOperationStatus(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ======== STARTED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String userId = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service creation"
+ utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>DELETE</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ utils.log("DEBUG", "Outgoing updateServiceOperStatusRequest: \n" + payload, isDebugEnabled)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing prepareInitServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
new file mode 100644
index 0000000000..b43a96bdb0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
@@ -0,0 +1,362 @@
+/*-
+ * ============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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DelServiceInstance.bpmn</class> process.
+ *
+ */
+public class DeleteGenericALaCarteServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteGenericALaCarteServiceInstance.class);
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ msoLogger.trace("Start preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.debug("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ //String xmlRequestDetails = vidUtils.getJsonRequestDetailstoXml(siRequest)
+ //execution.setVariable("requestDetails", xmlRequestDetails)
+
+ //modelInfo
+ String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ msoLogger.debug(msg)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ //msoLogger.debug("modelInfo" + serviceModelInfo)
+ }
+
+ //requestInfo
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ msoLogger.debug(msg)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+ String source = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("source", source)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ msoLogger.debug(msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ msoLogger.debug(msg)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(siRequest)
+
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+ if (userParams) {
+ userParams.each {
+ userParam -> inputMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug("User Input Parameters map: " + userParams.toString())
+ execution.setVariable("serviceInputParams", inputMap)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start sendSyncResponse")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ msoLogger.debug(" sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.trace("Exit sendSyncResopnse")
+ }
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start sendSyncError")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ MsoLogger.info(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start prepareCompletion")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DeleteGenericALaCarteServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit prepareCompletionRequest")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("Start prepareFalloutRequest")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.debug("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in CreateServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("Exit prepareFalloutRequest ")
+ }
+
+
+ // *******************************
+ // Build DB request Section
+ // *******************************
+ public void prepareDBRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ msoLogger.trace("Inside prepareDBRequest of DeleteGenericALaCarteServiceInstance ")
+
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = "Service Instance successfully deleted."
+
+ //TODO - verify the format for Service Instance Delete,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBRequest", buildDeleteDBRequestAsString)
+ msoLogger.info(buildDeleteDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteGenericALaCarteServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+ public void prepareDBRequestError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareDBRequestError of DeleteGenericALaCarteServiceInstance ")
+
+ try {
+ String requestId = execution.getVariable("DELSI_requestId")
+ String statusMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ statusMessage = wfe.getErrorMessage()
+
+ } else {
+ statusMessage = "Encountered Error during DeleteGenericALaCarteServiceInstance proccessing. "
+ }
+
+ //TODO - verify the format for Service Instance Create,
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
+ msoLogger.info(buildDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteGenericALaCarteServiceInstance flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
new file mode 100644
index 0000000000..816ba859ee
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
@@ -0,0 +1,420 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+public class DeleteNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="DELNI_"
+ String groovyClassName = "DeleteNetworkInstance"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteNetworkInstance.class);
+
+
+ public InitializeProcessVariables(DelegateExecution execution){
+
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ execution.setVariable(Prefix + "FalloutHandlerRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of " + groovyClassName + "")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null || sdncVersion == '1610') {
+ // 'a-la-cart' default, sdncVersion = '1610'
+ execution.setVariable("sdncVersion", "1610")
+ String bpmnRequest = execution.getVariable("bpmnRequest")
+ // set 'disableRollback'
+ if (bpmnRequest != null) {
+ String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback")
+ if (disableRollback != null) {
+ execution.setVariable("disableRollback", disableRollback)
+ msoLogger.debug("Received 'suppressRollback': " + disableRollback )
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ msoLogger.debug(" Set 'disableRollback' : " + execution.getVariable("disableRollback") )
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' test ONLY, sdncVersion = '1702'
+ msoLogger.debug(" 'disableRollback' : " + execution.getVariable("disableRollback") )
+ }
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // get/set 'requestId'
+ if (execution.getVariable("requestId") == null) {
+ execution.setVariable("requestId", requestId)
+ }
+
+ // set action to "DELETE"
+ execution.setVariable("action", "DELETE")
+
+ //Place holder for additional code.
+
+ // TODO ???
+ // userParams??? 1) pre-loads indicator, 2) 'auto-activation'
+ // Tag/Value parameters
+ //
+ // Map: 'networkInputParams': 'auto-activation''
+ // Sample format?
+ // "requestParameters": {
+ // "userParams": [
+ // {
+ // "name": "someUserParam1",
+ // "value": "someValue1"
+ // }
+ // ]
+ // }
+ //
+ // String userParams = //use json util to extract "userParams"//
+ // execution.setVariable("networkInputParams", userParams)
+ // else: execution.setVariable("networkInputParams", null)
+ //
+
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ String exceptionMessage = "Exception Encountered in " + groovyClassName + ", PreProcessRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void getNetworkModelInfo (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside getNetworkModelInfo() of DeleteNetworkInstance")
+
+ try {
+
+ // For Ala-Carte (sdnc = 1610):
+ // 1. the Network ModelInfo is expected to be sent
+ // via requestDetails.modelInfo (modelType = network), ex: modelCustomizationId.
+ // 2. the Service ModelInfo is expected to be sent but will be IGNORE
+ // via requestDetails.relatedInstanceList.relatedInstance.modelInfo (modelType = service)
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside sendSyncResponse() of DeleteNetworkInstance")
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug(" sendSyncResponse to APIH - " + "\n" + deleteNetworkRestRequest)
+
+ sendWorkflowResponse(execution, 202, deleteNetworkRestRequest)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DeleteNetworkInstance, sendSyncResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareCompletion() of CreateNetworkInstance")
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ // normal path
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void prepareDBRequestError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ msoLogger.trace("Inside prepareDBRequestError of DeleteNetworkInstance")
+
+ // set DB Header Authorization
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String statusMessage = wfe.getErrorMessage()
+ String requestId = execution.getVariable(Prefix +"requestId")
+
+ String dbRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "deleteDBRequest", dbRequest)
+ msoLogger.debug(" DB Adapter Request - " + "\n" + dbRequest)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, prepareDBRequestError() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside postProcessResponse() of DeleteNetworkInstance")
+
+ try {
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ msoLogger.trace("DeleteNetworkInstance Success")
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ msoLogger.trace("DeleteNetworkInstance Failed in CompletionMsoProces flow!.")
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DeleteNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler.")
+
+ String dbReturnCode = execution.getVariable(Prefix + "dbReturnCode")
+ msoLogger.debug("DB Update Response Code : " + dbReturnCode)
+ msoLogger.debug("DB Update Response String: " + '\n' + execution.getVariable(Prefix + "deleteDBResponse"))
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+ execution.setVariable(Prefix + "Success", false)
+ try {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String errorCode = String.valueOf(wfe.getErrorCode())
+ String errorMessage = wfe.getErrorMessage()
+
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ msoLogger.debug(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,"Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest,"BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "")
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, buildErrorResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELEtE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(exceptionMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>9999</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,"Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest,"BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex)
+ }
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteNetworkRestError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug(" sendSyncResponse to APIH - " + "\n" + deleteNetworkRestError)
+
+ sendWorkflowResponse(execution, 500, deleteNetworkRestError)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed - DeleteNetworkInstance, sendSyncError(): " + "\n" + ex.getMessage())
+ }
+ }
+
+ public void processJavaException(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.debug("Caught a Java Exception")
+ msoLogger.debug("Started processJavaException Method")
+ msoLogger.debug("Variables List: " + execution.getVariables())
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.debug("Completed processJavaException Method of " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
new file mode 100644
index 0000000000..ab5500602f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -0,0 +1,308 @@
+/*-
+ * ============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 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.recipe.ResourceInput;
+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.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DeleteSDNCCNetworkResource.bpmn</class> process.
+ * flow for SDNC Network Resource
+ */
+public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSDNCRES_"
+
+ 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 resourceModelName = resourceInputObj.getResourceModelInfo().getModelName()
+ //For sdnc requestAction default is "NetworkInstance"
+ String operationType = "Network"
+ if(!StringUtils.isBlank(recipeParamsFromRequest) && "null" != 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")
+ }
+
+
+ //For sdnc, generate svc_action and request_action
+ String sdnc_svcAction = "delete"
+ if(StringUtils.containsIgnoreCase(resourceModelName, "overlay")){
+ //This will be resolved in R3.
+ sdnc_svcAction ="deactivate"
+ operationType = "NCINetwork"
+ }
+ if(StringUtils.containsIgnoreCase(resourceModelName, "underlay")){
+ //This will be resolved in R3.
+ operationType ="Network"
+ }
+ String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
+ execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
+ execution.setVariable(Prefix + "requestAction", sdnc_requestAction)
+ 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){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ /**
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ * generate the nsParameters
+ */
+ public void prepareSDNCRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdnc_svcAction = execution.getVariable(Prefix + "svcAction")
+ String sdnc_requestAction = execution.getVariable(Prefix + "requestAction")
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = 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()
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String 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>
+ </service-information>
+ <network-information>
+ <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>
+ <network-request-input>
+ <network-input-parameters></network-input-parameters>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("INFO","sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DeleteSDNCCNetworkResource 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 prepareUpdateBeforeDeleteSDNCResource(DelegateExecution execution) {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String serviceInstanceId = resourceInputObj.getServiceInstanceId()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = "20"
+ String status = "processing"
+ String statusDescription = "SDCN resource delete invoked"
+
+ //String operationId = execution.getVariable("operationId")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${MsoUtils.xmlEscape(operType)}</operType>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
+ <status>${MsoUtils.xmlEscape(status)}</status>
+ <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+
+ setProgressUpdateVariables(execution, body)
+
+ }
+
+ public void prepareUpdateAfterDeleteSDNCResource(DelegateExecution execution) {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String serviceInstanceId = resourceInputObj.getServiceInstanceId()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = "100"
+ String status = "finished"
+ String statusDescription = "SDCN resource delete completed"
+
+ //String operationId = execution.getVariable("operationId")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${MsoUtils.xmlEscape(operType)}</operType>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
+ <status>${MsoUtils.xmlEscape(status)}</status>
+ <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+
+ setProgressUpdateVariables(execution, body)
+ }
+
+ public void postDeleteSDNCCall(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled)
+ String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
+ 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/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
new file mode 100644
index 0000000000..536783bc33
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
@@ -0,0 +1,87 @@
+
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.fasterxml.jackson.databind.ObjectMapper
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+
+
+public class DeleteVFCNSResource extends AbstractServiceTaskProcessor {
+
+ String Prefix = "DCUSE_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** start preProcessRequest *****", isDebugEnabled)
+
+ String resourceInputStr = execution.getVariable("resourceInput")
+ ResourceInput resourceInput = new ObjectMapper().readValue(resourceInputStr, ResourceInput.class)
+
+ String globalSubscriberId = resourceInput.getGlobalSubscriberId()
+ String serviceType = execution.getVariable("serviceType")
+ String operationId = resourceInput.getOperationId()
+ String resourceModeluuid = resourceInput.getResourceModelInfo().getModelCustomizationUuid()
+ String resourceInstanceId = resourceInput.getResourceInstancenUuid()
+
+
+ execution.setVariable("globalSubscriberId",globalSubscriberId)
+ execution.setVariable("serviceType", serviceType)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("resourceTemplateId", resourceModeluuid)
+ execution.setVariable("resourceInstanceId", resourceInstanceId)
+
+ utils.log("INFO"," ***** end preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** start postProcessRequest *****", isDebugEnabled)
+
+ utils.log("INFO"," ***** end postProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ String operationStatus = execution.getVariable("operationStatus")
+ // RESTResponse for main flow
+ String createVFCResourceRestRsp = """{"nsInstanceId":"${nsInstanceId}","operationStatus":"${operationStatus}"}""".trim()
+ utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + createVFCResourceRestRsp, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createVFCResourceRestRsp)
+ 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)
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
new file mode 100644
index 0000000000..682421e806
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
@@ -0,0 +1,367 @@
+/*-
+ * ============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.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.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonSlurper
+
+
+
+public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteVfModuleInfra.class);
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'DELVfModI_')
+ execution.setVariable('DELVfModI_requestInfo', null)
+ execution.setVariable('DELVfModI_requestId', null)
+ execution.setVariable('DELVfModI_source', null)
+ execution.setVariable('DELVfModI_vnfInputs', null)
+ execution.setVariable('DELVfModI_vnfId', null)
+ execution.setVariable('DELVfModI_vfModuleId', null)
+ execution.setVariable('DELVfModI_tenantId', null)
+ execution.setVariable('DELVfModI_volumeGroupId', null)
+ execution.setVariable('DELVfModI_vnfParams', null)
+ execution.setVariable('DELVfModI_updateInfraRequest', null)
+ execution.setVariable('DeleteVfModuleRequest', null)
+ execution.setVariable('DeleteVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Process the incoming DELETE_VF_MODULE vnf-request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("isVidRequest", "false")
+ initProcessVariables(execution)
+
+ def prefix = execution.getVariable('prefix')
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ msoLogger.debug("serviceInstanceId is: " + serviceInstanceId)
+ def vnfId = execution.getVariable('vnfId')
+ msoLogger.debug("vnfId is: " + vnfId)
+ def cloudConfiguration = jsonUtil.getJsonValue(incomingRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("cloudConfiguration", cloudConfiguration)
+ msoLogger.debug("CloudConfiguration is: " + cloudConfiguration)
+ def vfModuleModelInfo = jsonUtil.getJsonValue(incomingRequest, "requestDetails.modelInfo")
+
+ execution.setVariable("vfModuleModelInfo", vfModuleModelInfo)
+ msoLogger.debug("VfModuleModelInfo is: " + vfModuleModelInfo)
+
+ // This is aLaCarte flow, so aLaCarte flag is always on
+ execution.setVariable('aLaCarte', true)
+
+ def vidUtils = new VidUtils(this)
+
+ String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'DELETE_VF_MODULE', serviceInstanceId)
+
+ msoLogger.debug(" Request in XML format: " + requestInXmlFormat)
+
+ setBasicDBAuthHeader(execution, isDebugLogEnabled)
+
+ execution.setVariable(prefix + 'Request', requestInXmlFormat)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,"Caught exception", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
+ }
+
+
+ try {
+
+ String request = validateRequest(execution)
+ execution.setVariable('DeleteVfModuleRequest', request)
+ msoLogger.debug("DeleteVfModuleInfra Request: " + request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModI_requestInfo', requestInfo)
+ execution.setVariable('DELVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('DELVfModI_source', getNodeTextForce(requestInfo, 'source'))
+
+ def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+ execution.setVariable('DELVfModI_vnfInputs', vnfInputs)
+ execution.setVariable('DELVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DELVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DELVfModI_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+ execution.setVariable('DELVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('DELVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('DELVfModI_vnfParams', vnfParams)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,"Caught exception in "+method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Sends the 'IN_PROGRESS' synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('DELVfModI_requestInfo')
+ def requestId = execution.getVariable('DELVfModI_requestId')
+ def source = execution.getVariable('DELVfModI_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+ String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug("DeleteVfModuleInfra Synch Response: " + synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,"Caught exception in "+method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Currently passing the entire DELETE_VF_MODULE vnf-request to DoDeleteVfModule.
+ * 'DeleteVfModuleRequest' is now being set in preProcessRequest().
+ * TBD: may want to eventually create a specific request that only contains the needed fields.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoDeleteVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoDeleteVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the DB update to add an entry for the Vf Module request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('DELVfModI_requestId')
+ def vnfId = execution.getVariable('DELVfModI_vnfId')
+ def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+ def tenantId = execution.getVariable('DELVfModI_tenantId')
+ def volumeGroupId = execution.getVariable('DELVfModI_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('DELVfModI_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void completionHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def request = execution.getVariable("DeleteVfModuleRequest")
+ def requestInfo = utils.getNodeXml(request, 'request-info', false)
+ def action = utils.getNodeText(requestInfo, "action")
+
+ String content =
+ """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:ns8="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ ${requestInfo}
+ </request-info>
+ <ns8:status-message>Vf Module has been deleted successfully.</ns8:status-message>
+ <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+ def request = execution.getVariable("DeleteVfModuleRequest")
+ def requestInfo = utils.getNodeXml(request, 'request-info', false)
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000000..2cbfeac239
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,545 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+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 groovy.json.JsonSlurper
+
+/**
+ * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
+ */
+public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteVfModuleVolumeInfraV1.class);
+
+ private XmlParser xmlParser = new XmlParser()
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ execution.setVariable('prefix', 'DELVfModVol_')
+ execution.setVariable("DELVfModVol_volumeRequest", null)
+ execution.setVariable('DELVfModVol_requestInfo', null)
+ execution.setVariable('DELVfModVol_requestId', null)
+ execution.setVariable('DELVfModVol_source', null)
+ execution.setVariable('DELVfModVol_volumeInputs', null)
+ execution.setVariable('DELVfModVol_volumeOutputs', null)
+ execution.setVariable('DELVfModVol_volumeGroupId', null)
+ execution.setVariable('DELVfModVol_vnfType', null)
+ execution.setVariable('DELVfModVol_serviceId', null)
+ execution.setVariable('DELVfModVol_cloudRegion', null)
+ execution.setVariable('DELVfModVol_tenantId', null)
+ execution.setVariable('DELVfModVol_volumeParams', null)
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', null)
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", null)
+ execution.setVariable('DELVfModVol_messageId', null)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', null)
+ execution.setVariable('DELVfModVol_updateInfraRequest', null)
+ execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', null)
+ execution.setVariable('DELVfModVol_WorkflowException', null)
+ execution.setVariable('DELVfModVol_TransactionSuccessIndicator', false)
+ execution.setVariable("DELVfModVol_isErrorMessageException", false)
+ execution.setVariable('DELVfModVol_syncResponseSent', false)
+ }
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution, isDebugLogEnabled) {
+
+ InitializeProcessVariables(execution)
+
+ String createVolumeIncoming = validateRequest(execution)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def vidUtils = new VidUtils(this)
+ createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'DELETE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+ execution.setVariable("DELVfModVol_isVidRequest", true)
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is in XML format.")
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ String request = utils.getNodeXml(createVolumeIncoming, "volume-request").drop(38).trim().replace("tag0:","").replace(":tag0","")
+ execution.setVariable("DELVfModVol_volumeRequest", request)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('DELVfModVol_requestInfo', requestInfo)
+ String requestId = execution.getVariable("mso-request-id")
+ if (requestId == null || requestId == "") {
+ requestId = getRequiredNodeText(execution, requestInfo, 'request-id')
+ }
+ execution.setVariable('DELVfModVol_requestId', requestId)
+ execution.setVariable('DELVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('DELVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('DELVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('DELVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('DELVfModVol_serviceId', utils.getNodeText(volumeInputs, 'service-id'))
+ execution.setVariable('DELVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+ execution.setVariable('DELVfModVol_messageId', UUID.randomUUID().toString())
+ execution.setVariable('DELVfModVol_volumeOutputs', utils.getNodeXml(request, 'volume-outputs', false))
+ execution.setVariable('DELVfModVol_volumeParams', utils.getNodeXml(request, 'volume-params'))
+ execution.setVariable('DELVfModVol_cloudRegion', utils.getNodeText(request, 'aic-cloud-region'))
+
+ setBasicDBAuthHeader(execution, isDebugLogEnabled)
+
+ msoLogger.debug('Request: ' + createVolumeIncoming)
+ }
+
+ public void sendSyncResponse (DelegateExecution execution, isDebugEnabled) {
+
+ String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
+ msoLogger.debug(" DELVfModVol_volumeRequest - " + "\n" + volumeRequest)
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String deleteVolumeRequest =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" statusCode="200">
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ ${volumeRequest}
+ </rest:payload>
+ </rest:RESTResponse>""".trim()
+
+ def isVidRequest = execution.getVariable('DELVfModVol_isVidRequest')
+ def syncResponse = ''
+
+ if(isVidRequest) {
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(deleteVolumeRequest)
+ }
+
+ execution.setVariable('DELVfModVol_syncResponseSent', true)
+
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+
+ public void sendSyncError (DelegateExecution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ def errorCode = we?.getErrorCode()
+ def errorMessage = we?.getErrorMessage()
+ //default to 400 since only invalid request will trigger this method
+ sendWorkflowResponse(execution, 400, errorMessage)
+ }
+
+
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution, isDebugEnabled) {
+
+ String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug(" DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable("DELVfModVol_queryCloudRegionReturnCode") == "404"){
+ execution.setVariable("DELVfModVol_aicCloudRegion", "AAIAIC25")
+ }else{
+ execution.setVariable("DELVfModVol_aicCloudRegion", cloudRegion)
+ }
+ execution.setVariable("DELVfModVol_cloudRegion", cloudRegion)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", true)
+
+ } else {
+ msoLogger.debug("AAI Query Cloud Region Unsuccessful.")
+ execution.setVariable("DELVfModVol_isCloudRegionGood", false)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
+ }
+
+ msoLogger.debug(" is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"))
+ }
+
+ /**
+ * Query volume group by id
+ * @param execution
+ */
+ public void queryAAIForVolumeGroup(DelegateExecution execution, isDebugLogEnabled) {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ if(volumeGroupId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, 'volume-group-id is not provided in the request')
+ throw new Exception('volume-group-id is not provided in the request')
+ }
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ msoLogger.debug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query volume group by id return code: " + returnCode)
+ msoLogger.debug("AAI query volume group by id response: " + aaiResponseAsString)
+
+ execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode == '204') {
+
+ def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ execution.setVariable('DELVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ if(hasVfModuleRelationship(aaiResponseAsString)){
+ msoLogger.debug('Volume Group ' + volumeGroupId + ' currently in use')
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+ }
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ msoLogger.debug("Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ }
+
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ msoLogger.debug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId )
+ }
+ else {
+ if (returnCode=='404') {
+ msoLogger.debug("Volume Group ${volumeGroupId} not found in AAI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} not found in AAI. Response code: 404")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Extract the Tenant Id from the Volume Group information returned by AAI.
+ *
+ * @param volumeGroupXml Volume Group XML returned by AAI.
+ * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+ * the Tenant Id is missing or could not otherwise be extracted.
+ */
+ private String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+ def NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+ for (Node relationshipData in relationshipDataList) {
+ def Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+ if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+ def Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+ if (relationshipValue != null) {
+ return relationshipValue.text()
+ }
+ }
+ }
+ }
+ }
+ }
+ return null
+ }
+
+ private boolean hasVnfRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('generic-vnf'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ private boolean hasVfModuleRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('vf-module'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ public void prepareVnfAdapterDeleteRequest(DelegateExecution execution, isDebugLogEnabled) {
+ def cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+ def tenantId = execution.getVariable('DELVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ def volumeGroupHeatStackId = execution.getVariable('DELVfModVol_volumeGroupHeatStackId')
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def serviceId = execution.getVariable('DELVfModVol_serviceId')
+
+ def messageId = execution.getVariable('DELVfModVol_messageId')
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host", execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <deleteVolumeGroupRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
+ msoLogger.debug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest)
+ }
+
+
+ public void deleteVolGrpId(DelegateExecution execution, isDebugEnabled) {
+
+ // get variables
+ String queryAAIVolGrpIdResponse = execution.getVariable("DELVfModVol_queryAAIVolGrpResponse")
+ String groupId = utils.getNodeText(queryAAIVolGrpIdResponse, "volume-group-id")
+ String resourceVersion = utils.getNodeText(queryAAIVolGrpIdResponse, "resource-version")
+ String messageId = execution.getVariable('DELVfModVol_messageId')
+ String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+
+ if(resourceVersion !=null){
+ deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
+ }
+
+ msoLogger.debug("Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI delete volume group return code: " + returnCode)
+ msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ if (returnCode=='200' || (returnCode == '204')) {
+ msoLogger.debug("Volume group $groupId deleted.")
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $groupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ public void prepareDBRequest (DelegateExecution execution, isDebugLogEnabled) {
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+ ExceptionUtil exceptionUtil = new ExceptionUtil();
+ def requestId = execution.getVariable('DELVfModVol_requestId')
+ def volOutputs = execution.getVariable('DELVfModVol_volumeOutputs')
+ def statusMessage = "VolumeGroup successfully deleted"
+ def progress = "100"
+ def requestStatus = "COMPLETE"
+
+ if (workflowExceptionObj != null) {
+ statusMessage = (workflowExceptionObj.getErrorMessage())
+ execution.setVariable("DELVfModVol_WorkflowExceptionMessage", statusMessage)
+ execution.setVariable("DELVfModVol_WorkflowExceptionCode", workflowExceptionObj.getErrorCode())
+ requestStatus = "FAILURE"
+ progress = ""
+ }
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
+ <requestStatus>${MsoUtils.xmlEscape(requestStatus)}</requestStatus>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <vnfOutputs>${MsoUtils.xmlEscape(volOutputs)}</vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('DELVfModVol_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+
+ }
+
+
+ public void prepareCompletionHandlerRequest (DelegateExecution execution, isDebugLogEnabled) {
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable("DELVfModVol_source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+ execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ }
+
+
+
+ public void prepareFalloutHandler (DelegateExecution execution, isDebugEnabled) {
+
+ execution.setVariable("DELVfModVol_Success", false)
+ String requestId = execution.getVariable("DELVfModVol_requestId")
+ String source = execution.getVariable("DELVfModVol_source")
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+ def errorMessage = workflowExceptionObj.getErrorMessage()
+ def errorCode = workflowExceptionObj.getErrorCode()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+ msoLogger.debug(xmlHandlerRequest)
+
+ execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Overall Error Response going to FalloutHandler", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "\n" + xmlHandlerRequest);
+
+ }
+
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(DelegateExecution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('DELVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('DELVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = 'TenantId ' + tenantId + ' in incoming request does not match Tenant Id ' + volumeGroupTenantId +
+ ' retrieved from AAI for Volume Group Id ' + volumeGroupId
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Error in DeleteVfModuleVolume: " + "\n" + errorMessage, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
new file mode 100644
index 0000000000..9dfb9107b2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
@@ -0,0 +1,207 @@
+/*-
+ * ============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.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.common.scripts.ExceptionUtil;
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.logger.MsoLogger
+
+
+/**
+ * This class supports the DeleteVnfInfra Flow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ */
+class DeleteVnfInfra extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteVnfInfra.class);
+
+ String Prefix="DELVI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DeleteVnfInfra PreProcessRequest Process")
+
+ execution.setVariable("DELVI_SuccessIndicator", false)
+ execution.setVariable("DELVI_vnfInUse", false)
+
+ try{
+ // Get Variables
+ String deleteVnfRequest = execution.getVariable("bpmnRequest")
+ execution.setVariable("DELVI_DeleteVnfRequest", deleteVnfRequest)
+ msoLogger.debug("Incoming DeleteVnfInfra Request is: \n" + deleteVnfRequest)
+
+ if(deleteVnfRequest != null){
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("DELVI_requestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DELVI_serviceInstanceId", serviceInstanceId)
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DELVI_vnfId", vnfId)
+ msoLogger.debug("Incoming Vnf(Instance) Id is: " + vnfId)
+
+ String source = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.requestInfo.source")
+ execution.setVariable("DELVI_source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ def cloudConfiguration = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("DELVI_cloudConfiguration", cloudConfiguration)
+
+ boolean cascadeDelete = false
+ Boolean cascadeDeleteObj = jsonUtil.getJsonRawValue(deleteVnfRequest, "requestDetails.requestParameters.cascadeDelete")
+ if(cascadeDeleteObj!=null){
+ cascadeDelete = cascadeDeleteObj.booleanValue()
+ }
+ execution.setVariable("DELVI_cascadeDelete", cascadeDelete)
+ msoLogger.debug("Incoming cascadeDelete is: " + cascadeDelete)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("DELVI_requestInfo", requestInfo)
+
+ // Setting for sub flow calls
+ execution.setVariable("DELVI_type", "generic-vnf")
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DeleteVnfInfra PreProcessRequest method!" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DeleteVnfInfra PreProcessRequest Process")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED DeleteVnfInfra SendSyncResponse Process")
+
+ try {
+ String requestId = execution.getVariable("DELVI_requestId")
+ String vnfId = execution.getVariable("DELVI_vnfId")
+
+ String DeleteVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug("DeleteVnfInfra Sync Response is: \n" + DeleteVnfResponse)
+ execution.setVariable("DELVI_sentSyncResponse", true)
+
+ sendWorkflowResponse(execution, 202, DeleteVnfResponse)
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in DeleteVnfInfra SendSyncResponse Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra SendSyncResponse Process")
+
+ }
+ msoLogger.trace("COMPLETED DeleteVnfInfra SendSyncResponse Process")
+ }
+
+ public void prepareCompletionHandlerRequest(DelegateExecution execution){
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED DeleteVnfInfra PrepareCompletionHandlerRequest Process")
+
+ try {
+ String requestInfo = execution.getVariable("DELVI_requestInfo")
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+ String vnfId = execution.getVariable("DELVI_vnfId")
+
+ String request =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <status-message>Vnf has been deleted successfully.</status-message>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <mso-bpel-name>DeleteVnfInfra</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ execution.setVariable("DELVI_completionHandlerRequest", request)
+ msoLogger.debug("Completion Handler Request is: " + request)
+
+ execution.setVariable("WorkflowResponse", "Success") // for junits
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process")
+
+ }
+ msoLogger.trace("COMPLETED DeleteVnfInfra PrepareCompletionHandlerRequest Process")
+ }
+
+ public void sendErrorResponse(DelegateExecution execution){
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED DeleteVnfInfra sendErrorResponse Process")
+ try {
+ def sentSyncResponse = execution.getVariable("DELVI_sentSyncResponse")
+ if(sentSyncResponse == false){
+ msoLogger.debug("Sending a Sync Error Response")
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+ msoLogger.debug(response)
+ sendWorkflowResponse(execution, 500, response)
+ }else{
+ msoLogger.debug("A Sync Response has already been sent. Skipping Send Sync Error Response.")
+ }
+
+ } catch(Exception ex) {
+ msoLogger.debug("Error Occured in DeleteVnfInfra sendErrorResponse Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra sendErrorResponse Process")
+ }
+ msoLogger.trace("COMPLETED DeleteVnfInfra sendErrorResponse Process")
+ }
+
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
new file mode 100644
index 0000000000..98605fea8b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
@@ -0,0 +1,258 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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 org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.NetworkResource
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.recipe.BpmnRestClient
+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.scripts.CatalogDbUtils;
+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 java.util.List;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+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.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+
+/**
+ * This groovy class supports the <class>DoCompareModelVersions.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - model-invariant-id-target
+ * @param - model-version-id-target
+ * @param - model-invariant-id-original
+ * @param - model-version-id-original
+ *
+ * Outputs:
+ * @param - addResourceList
+ * @param - delResourceList
+ *
+ */
+public class DoCompareModelVersions extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCMPMDV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ utils.log("INFO"," ***** preProcessRequest *****", isDebugEnabled)
+
+ try {
+ execution.setVariable("prefix", Prefix)
+
+ //Inputs
+ String modelInvariantUuid_target = execution.getVariable("model-invariant-id-target")
+ if (isBlank(modelInvariantUuid_target)) {
+ msg = "Input model-invariant-id-target is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String modelUuid_target = execution.getVariable("model-version-id-target")
+ if (isBlank(modelUuid_target)) {
+ msg = "Input model-version-id-target is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String modelInvariantUuid_original = execution.getVariable("model-invariant-id-original")
+ if (isBlank(modelInvariantUuid_original)) {
+ msg = "Input model-invariant-id-original is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String modelUuid_original = execution.getVariable("model-version-id-original")
+ if (isBlank(modelUuid_original)) {
+ msg = "Input model-version-id-original is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ // Target and original modelInvariantUuid must to be the same
+ if(modelInvariantUuid_target != modelInvariantUuid_original){
+ msg = "Input model-invariant-id-target and model-invariant-id-original must to be the same"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ // Target and original modelUuid must not to be the same
+ if(modelUuid_target == modelUuid_original){
+ msg = "Input model-version-id-target and model-version-id-original must not to be the same"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void prepareDecomposeService_Target(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDecomposeService_Target of update generic e2e service ***** ", isDebugEnabled)
+ String modelInvariantUuid = execution.getVariable("model-invariant-id-target")
+ String modelUuid = execution.getVariable("model-version-id-target")
+ //here modelVersion is not set, we use modelUuid to decompose the service.
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelUuid}",
+ "modelVersion":""
+ }"""
+
+ execution.setVariable("serviceModelInfo_Target", serviceModelInfo)
+
+ utils.log("DEBUG", " ***** Completed prepareDecomposeService_Target of update generic e2e service ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in update generic e2e service flow. Unexpected Error from method prepareDecomposeService_Target() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void processDecomposition_Target(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside processDecomposition_Target() of update generic e2e service flow ***** ", isDebugEnabled)
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ execution.setVariable("serviceDecomposition_Target", serviceDecomposition)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in update generic e2e service flow. Unexpected Error from method processDecomposition_Target() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareDecomposeService_Original(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDecomposeService_Original of update generic e2e service ***** ", isDebugEnabled)
+ String modelInvariantUuid = execution.getVariable("model-invariant-id-original")
+ String modelUuid = execution.getVariable("model-version-id-original")
+ //here modelVersion is not set, we use modelUuid to decompose the service.
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelUuid}",
+ "modelVersion":""
+ }"""
+
+ execution.setVariable("serviceModelInfo_Original", serviceModelInfo)
+
+ utils.log("DEBUG", " ***** Completed prepareDecomposeService_Original of update generic e2e service ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in update generic e2e service flow. Unexpected Error from method prepareDecomposeService_Original() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void processDecomposition_Original(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside processDecomposition_Original() of update generic e2e service flow ***** ", isDebugEnabled)
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ execution.setVariable("serviceDecomposition_Original", serviceDecomposition)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in update generic e2e service flow. processDecomposition_Original() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void doCompareModelVersions(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start doCompareModelVersions Process ======== ", isDebugEnabled)
+
+ ServiceDecomposition serviceDecomposition_Target = execution.getVariable("serviceDecomposition_Target")
+ ServiceDecomposition serviceDecomposition_Original = execution.getVariable("serviceDecomposition_Original")
+
+ List<Resource> allSR_target = serviceDecomposition_Target.getServiceResources();
+ List<Resource> allSR_original = serviceDecomposition_Original.getServiceResources();
+
+ List<Resource> addResourceList = new ArrayList<String>()
+ List<Resource> delResourceList = new ArrayList<String>()
+
+ addResourceList.addAll(allSR_target)
+ delResourceList.addAll(allSR_original)
+
+ //Compare
+ for (Resource rc_t : allSR_target){
+ String muuid = rc_t.getModelInfo().getModelUuid()
+ String mIuuid = rc_t.getModelInfo().getModelInvariantUuid()
+ String mCuuid = rc_t.getModelInfo().getModelCustomizationUuid()
+ for (Resource rc_o : allSR_original){
+ if(rc_o.getModelInfo().getModelUuid() == muuid
+ && rc_o.getModelInfo().getModelInvariantUuid() == mIuuid
+ && rc_o.getModelInfo().getModelCustomizationUuid() == mCuuid) {
+ addResourceList.remove(rc_t);
+ delResourceList.remove(rc_o);
+ }
+ }
+ }
+
+ execution.setVariable("addResourceList", addResourceList)
+ execution.setVariable("delResourceList", delResourceList)
+ utils.log("INFO", "addResourceList: " + addResourceList, isDebugEnabled)
+ utils.log("INFO", "delResourceList: " + delResourceList, isDebugEnabled)
+
+ utils.log("INFO", "======== COMPLETED doCompareModelVersions Process ======== ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
new file mode 100644
index 0000000000..eceba5abe3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
@@ -0,0 +1,260 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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 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 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.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - subscriptionServiceType
+ * @param - serviceInstanceId
+ * @param - modelInvariantIdTarget
+ * @param - modelVersionIdTarget
+ *
+ * Outputs:
+ * @param - compareModelsResult CompareModelsResult
+
+ */
+public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCMPMDSI_"
+ private static final String DebugFlag = "isDebugEnabled"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO","Entered " + method, isDebugEnabled)
+ String msg = ""
+ utils.log("INFO"," ***** Enter DoCompareModelofE2EServiceInstance preProcessRequest *****", isDebugEnabled)
+
+ 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)
+
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ 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)
+ }
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String modelInvariantUuid = execution.getVariable("modelInvariantIdTarget")
+ if (isBlank(modelInvariantUuid)){
+ msg = "Input modelInvariantUuid is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String modelUuid = execution.getVariable("modelVersionIdTarget")
+ if (isBlank(modelUuid)){
+ msg = "Input modelUuid is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ // Set Target Template info
+ execution.setVariable("model-invariant-id-target", modelInvariantUuid)
+ execution.setVariable("model-version-id-target", modelUuid)
+
+
+ utils.log("INFO", "Exited " + method, isDebugEnabled)
+ }
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ 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) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ 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;
+ for(Resource rc : addResourceList) {
+ mi = rc.getModelInfo()
+ String resourceCustomizationUuid = mi.getModelCustomizationUuid()
+ ResourceModelInfo rmodel = new ResourceModelInfo()
+ rmodel.setResourceName(mi.getModelName())
+ rmodel.setResourceInvariantUuid(mi.getModelInvariantUuid())
+ rmodel.setResourceUuid(mi.getModelUuid())
+ rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
+ addedResourceList.add(rmodel)
+
+ Map<String, Object> resourceParameters = ResourceRequestBuilder.buildResouceRequest(serviceModelUuid, resourceCustomizationUuid, null)
+ requestInputs.addAll(resourceParameters.keySet())
+ }
+
+ for(Resource rc : delResourceList) {
+ mi = rc.getModelInfo()
+ String resourceCustomizationUuid = mi.getModelCustomizationUuid()
+ ResourceModelInfo rmodel = new ResourceModelInfo()
+ rmodel.setResourceName(mi.getModelName())
+ rmodel.setResourceInvariantUuid(mi.getModelInvariantUuid())
+ rmodel.setResourceUuid(mi.getModelUuid())
+ rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
+ deletedResourceList.add(rmodel)
+ }
+
+ cmpResult.setAddedResourceList(addedResourceList)
+ cmpResult.setDeletedResourceList(deletedResourceList)
+ 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-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
new file mode 100644
index 0000000000..bb48671e73
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -0,0 +1,451 @@
+/*-
+ * ============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.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.AaiUtil
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.RollbackData
+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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils;
+
+import groovy.json.*
+
+
+
+/**
+ * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - subscriptionServiceType
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceModelInfo
+ * @param - productFamilyId
+ * @param - disableRollback
+ * @param - failExists - TODO
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion ("1610")
+ * @param - serviceDecomposition - Decomposition for R1710
+ * (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
+ *
+ * Outputs:
+ * @param - rollbackData (localRB->null)
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ * @param - WorkflowException
+ * @param - serviceInstanceName - (GET from AAI if null in input)
+ *
+ */
+public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateE2EServiceInstance.class);
+
+
+ String Prefix="DCRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ String msg = ""
+ msoLogger.trace("preProcessRequest ")
+
+ try {
+ execution.setVariable("prefix", Prefix)
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ msoLogger.info(" ***** globalSubscriberId *****" + globalSubscriberId)
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String serviceType = execution.getVariable("serviceType")
+ msoLogger.info(" ***** serviceType *****" + serviceType)
+ //requestDetails.requestParameters. for SDNC assignTopology
+ String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
+
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ 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"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.info("SDNC Callback URL: " + sdncCallbackUrl)
+
+ //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")
+ String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
+ String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
+ String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
+ execution.setVariable("serviceModelName", serviceModelName)
+ //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)
+
+ //AAI PUT
+ String oStatus = execution.getVariable("initialStatus") ?: ""
+ if ("TRANSPORT".equalsIgnoreCase(serviceType))
+ {
+ oStatus = "Created"
+ }
+
+ 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)
+ String serviceInstanceData =
+ """<service-instance xmlns=\"${namespace}\">
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ <service-type>${MsoUtils.xmlEscape(aaiServiceType)}</service-type>
+ <service-role>${MsoUtils.xmlEscape(aaiServiceRole)}</service-role>
+ ${statusLine}
+ <model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ </service-instance>""".trim()
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ msoLogger.debug(serviceInstanceData)
+ msoLogger.info(" aai_uri " + aai_uri + " namespace:" + namespace)
+ msoLogger.info(" 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void prepareDecomposeService(DelegateExecution execution) {
+ try {
+ msoLogger.trace("Inside prepareDecomposeService of create generic e2e service ")
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("modelUuid")
+ //here modelVersion is not set, we use modelUuid to decompose the service.
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelUuid}",
+ "modelVersion":""
+ }"""
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ msoLogger.trace("Completed prepareDecomposeService of create generic e2e service ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void processDecomposition(DelegateExecution execution) {
+ msoLogger.trace("Inside processDecomposition() of create generic e2e service flow ")
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void doServicePreOperation(DelegateExecution execution){
+ //we need a service plugin platform here.
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String uuiRequest = execution.getVariable("uuiRequest")
+ String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest);
+ execution.setVariable("uuiRequest", newUuiRequest)
+ }
+
+ public void doServiceHoming(DelegateExecution execution) {
+ //we need a service plugin platform here.
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String uuiRequest = execution.getVariable("uuiRequest")
+ String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest);
+ execution.setVariable("uuiRequest", newUuiRequest)
+ }
+
+ 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", + 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){
+ msoLogger.info("Found Service-instance in AAI")
+ msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ } 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 postProcessAAIPUT(DelegateExecution execution) {
+ msoLogger.trace("postProcessAAIPUT ")
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(!succInAAI){
+ msoLogger.info("Error putting Service-instance in AAI", + serviceInstanceId)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ }
+ else
+ {
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
+ rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
+ rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)
+ rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType"))
+ rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIPUT ")
+ }
+
+ public void postProcessAAIGET2(DelegateExecution execution) {
+ msoLogger.trace("postProcessAAIGET2 ")
+ 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 postProcessAAIGET2", + serviceInstanceName)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ msg = "Failure in postProcessAAIGET2 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, "service-instance-name"))) {
+ execution.setVariable("serviceInstanceName", utils.getNodeText(aaiService, "service-instance-name"))
+ msoLogger.info("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"))
+ }
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIGET2 ")
+ }
+
+ public void preProcessRollback (DelegateExecution execution) {
+ msoLogger.trace("preProcessRollback ")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.info("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.info("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.info(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback ")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+ msoLogger.trace("postProcessRollback ")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.info("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.info("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.info(msg)
+ }
+ msoLogger.trace("Exit postProcessRollback ")
+ }
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ msoLogger.trace("STARTED preInitResourcesOperStatus Process ")
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = execution.getVariable("operationType")
+ String resourceTemplateUUIDs = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service creation"
+ msoLogger.info("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ 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)
+ msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ msoLogger.info("Outgoing initResourceOperationStatus: \n" + payload)
+ msoLogger.debug("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch(Exception e){
+ 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 ")
+ }
+
+ // 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-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
new file mode 100644
index 0000000000..05a0ea86d3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
@@ -0,0 +1,268 @@
+/*-
+ * ============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.infrastructure.scripts
+
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+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.logger.MsoLogger
+import org.onap.so.logger.MessageEnum
+
+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 java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+/**
+ * This groovy class supports the <class>DoCreateServiceInstanceRollback.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - rollbackData with
+ * globalCustomerId
+ * subscriptionServiceType
+ * serviceInstanceId
+ * disableRollback
+ * rollbackAAI
+ * rollbackSDNC
+ * sdncRollbackRequest
+ *
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoCreateE2EServiceInstanceRollback extends AbstractServiceTaskProcessor{
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateE2EServiceInstanceRollback.class);
+ String Prefix="DCRESIRB_"
+
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ msoLogger.trace("Start preProcessRequest")
+ execution.setVariable("rollbackAAI",false)
+ execution.setVariable("rollbackSDNC",false)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType("SERVICEINSTANCE")) {
+
+ def serviceInstanceId = rollbackData.get("SERVICEINSTANCE", "serviceInstanceId")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ def subscriptionServiceType = rollbackData.get("SERVICEINSTANCE", "subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+
+ def globalSubscriberId = rollbackData.get("SERVICEINSTANCE", "globalSubscriberId")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+
+ def rollbackAAI = rollbackData.get("SERVICEINSTANCE", "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ }
+
+ def rollbackSDNC = rollbackData.get("SERVICEINSTANCE", "rollbackSDNC")
+ if ("true".equals(rollbackSDNC))
+ {
+ execution.setVariable("rollbackSDNC", true)
+ }
+
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackSDNC") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ def sdncDelete = rollbackData.get("SERVICEINSTANCE", "sdncDelete")
+ execution.setVariable("sdncDelete", sdncDelete)
+ def sdncDeactivate = rollbackData.get("SERVICEINSTANCE", "sdncDeactivate")
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ msoLogger.debug("sdncDeactivate:\n" + sdncDeactivate)
+ msoLogger.debug("sdncDelete:\n" + sdncDelete)
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance Rollback preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) //TODO how does this even compile without exceptionUtil being declared
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method) {
+
+ msoLogger.trace("validateSDNCResponse")
+ String msg = ""
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msg = "SDNC Adapter service-instance rollback successful for " + method
+ msoLogger.debug(msg)
+ }else{
+ execution.setVariable("rolledBack", false)
+ msg = "Error Response from SDNC Adapter service-instance rollback for " + method
+ execution.setVariable("rollbackError", msg)
+ msoLogger.debug(msg)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance rollback for " + method + " Exception:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit validateSDNCResponse ")
+ }
+
+ /**
+ * Deletes the service instance in aai
+ */
+ public void deleteServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("Started Delete Service Instance")
+ try {
+ String globalCustId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("subscriptionServiceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient();
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+ resourceClient.delete(serviceInstanceUri)
+
+ msoLogger.trace("Completed Delete Service Instance")
+ }catch(Exception e){
+ msoLogger.debug("Error occured within deleteServiceInstance method: " + e)
+ }
+ }
+
+ public void postProcessRequest(DelegateExecution execution) {
+
+ msoLogger.trace("postProcessRequest")
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean rollbackAAI = execution.getVariable("rollbackAAI")
+ boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
+ if (rollbackAAI || rollbackSDNC)
+ {
+ execution.setVariable("rolledBack", true)
+ }
+ if (rollbackAAI)
+ {
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(!succInAAI){
+ execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
+ execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
+ msoLogger.debug("Error deleting service-instance in AAI for rollback", + serviceInstanceId)
+ }
+ }
+ msoLogger.trace("Exit postProcessRequest ")
+
+ } catch (BpmnError e) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + e.getMessage()
+ msoLogger.debug(msg)
+ } catch (Exception ex) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+
+ }
+
+ public void processRollbackException(DelegateExecution execution){
+
+ msoLogger.trace("processRollbackException")
+ try{
+ msoLogger.debug("Caught an Exception in DoCreateServiceInstanceRollback")
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught exception in ServiceInstance Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ msoLogger.debug("BPMN Error during processRollbackExceptions Method: ")
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processRollbackExceptions Method: " + e.getMessage())
+ }
+
+ msoLogger.trace(" Exit processRollbackException")
+ }
+
+ public void processRollbackJavaException(DelegateExecution execution){
+
+ msoLogger.trace("processRollbackJavaException")
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught Java exception in ServiceInstance Create Rollback")
+ msoLogger.debug("Caught Exception in processRollbackJavaException")
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception in processRollbackJavaException " + e.getMessage())
+ }
+ msoLogger.trace("Exit processRollbackJavaException")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
new file mode 100644
index 0000000000..4bbaef8ecb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -0,0 +1,1680 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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.rest.APIResponse;
+import org.springframework.web.util.UriUtils
+
+import groovy.json.*
+import groovy.xml.XmlUtil
+
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process.
+ *
+ */
+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()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ 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
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "networkRequest", "")
+ execution.setVariable(Prefix + "rollbackEnabled", null)
+ execution.setVariable(Prefix + "networkInputs", "")
+ //execution.setVariable(Prefix + "requestId", "")
+ execution.setVariable(Prefix + "messageId", "")
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable("BasicAuthHeaderValuePO", "")
+ execution.setVariable("BasicAuthHeaderValueSDNC", "")
+ execution.setVariable(Prefix + "serviceInstanceId","")
+ execution.setVariable("GENGS_type", "")
+ execution.setVariable(Prefix + "rsrc_endpoint", null)
+ execution.setVariable(Prefix + "networkOutputs", "")
+ execution.setVariable(Prefix + "networkId","")
+ execution.setVariable(Prefix + "networkName","")
+
+ // AAI query Name
+ execution.setVariable(Prefix + "queryNameAAIRequest","")
+ execution.setVariable(Prefix + "queryNameAAIResponse", "")
+ execution.setVariable(Prefix + "aaiNameReturnCode", "")
+ execution.setVariable(Prefix + "isAAIqueryNameGood", false)
+
+ // AAI query Cloud Region
+ execution.setVariable(Prefix + "queryCloudRegionRequest","")
+ execution.setVariable(Prefix + "queryCloudRegionReturnCode","")
+ execution.setVariable(Prefix + "queryCloudRegionResponse","")
+ execution.setVariable(Prefix + "cloudRegionPo","")
+ execution.setVariable(Prefix + "cloudRegionSdnc","")
+ execution.setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ execution.setVariable(Prefix + "queryIdAAIRequest","")
+ execution.setVariable(Prefix + "queryIdAAIResponse", "")
+ execution.setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ execution.setVariable(Prefix + "vpnBindings", null)
+ execution.setVariable(Prefix + "vpnCount", 0)
+ execution.setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ execution.setVariable(Prefix + "networkPolicyUriList", null)
+ execution.setVariable(Prefix + "networkPolicyCount", 0)
+ execution.setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ 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", "")
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIResponse", "")
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ execution.setVariable(Prefix + "createNetworkRequest", "")
+ execution.setVariable(Prefix + "createNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ //execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "networkReturnCode", "")
+ //execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ execution.setVariable(Prefix + "assignSDNCRequest", "")
+ execution.setVariable(Prefix + "assignSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ //execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncReturnCode", "")
+ //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", "")
+ //execution.setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncActivateReturnCode", "")
+ //execution.setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+ execution.setVariable(Prefix + "isSdncActivateRollbackNeeded", false)
+ execution.setVariable(Prefix + "sdncActivateResponseSuccess", false)
+
+ execution.setVariable(Prefix + "orchestrationStatus", "")
+ execution.setVariable(Prefix + "isVnfBindingPresent", false)
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "isException", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ 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
+ 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)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ } 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 == "") {
+ messageId = UUID.randomUUID()
+ msoLogger.debug(Prefix + "messageId, random generated: " + messageId)
+ } else {
+ 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
+ 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'."
+ msoLogger.debug(" Invalid Request - " + dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // validate 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)
+ 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 DoCreateNetworkInstance, 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'
+ String networkId = utils.getNodeText(networkRequest, "network-id")
+ if ((networkId == null) || (networkId == "null")) {
+ networkId = ""
+ }
+ String networkName = utils.getNodeText(networkRequest, "network-name")
+ if ((networkName == null) || (networkName == "null")) {
+ networkName = ""
+ }
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
+ <network-name>${MsoUtils.xmlEscape(networkName)}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ 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)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkName (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkName() of DoCreateNetworkInstance ***** " )
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkName = utils.getNodeText(networkInputs, "network-name")
+ networkName = UriUtils.encode(networkName,"UTF-8")
+
+ // Prepare AA&I url with network-name
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAINameRequest = "${aai_endpoint}${aai_uri}" + "?network-name=" + networkName
+ execution.setVariable(Prefix + "queryNameAAIRequest", queryAAINameRequest)
+ msoLogger.debug(Prefix + "queryNameAAIRequest - " + "\n" + queryAAINameRequest)
+
+ try {
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryAAINameRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiNameReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI Query Name Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ msoLogger.debug(" ***** AAI Query Name Response : " +'\n'+ aaiResponseAsString)
+
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "queryNameAAIResponse", aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIqueryNameGood", true)
+ String orchestrationStatus = ""
+ try {
+ // response is NOT empty
+ orchestrationStatus = utils.getNodeText(aaiResponseAsString, "orchestration-status")
+ 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)
+ msoLogger.debug(Prefix + "orchestrationStatus - " + orchestrationStatus)
+ }
+
+ } else {
+ if (returnCode=='404') {
+ msoLogger.debug(" QueryAAINetworkName return code = '404' (Not Found). Proceed with the Create !!! ")
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Error Response from QueryAAINetworkName - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ msoLogger.debug(Prefix + "isAAIqueryNameGood? : " + execution.getVariable(Prefix + "isAAIqueryNameGood"))
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAINetworkName() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAICloudRegion() of DoCreateNetworkInstance ***** " )
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug(Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
+
+ if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+ execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo)
+ execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc)
+ execution.setVariable(Prefix + "isCloudRegionGood", true)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode")
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ msoLogger.debug(" is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"))
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkId(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkId = ""
+ String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ if (execution.getVariable("sdncVersion") != "1610") {
+ String networkResponseInformation = ""
+ 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")
+ }
+ if (networkId == null || networkId == "null") {
+ String dataErrorMessage = "SNDC Response did not contains 'instance-id' or 'network-id' element, or the value is null."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ } else {
+ 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
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+ execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest)
+ msoLogger.debug(Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
+
+ msoLogger.debug(" ***** AAI Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ 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")
+ execution.setVariable(Prefix + "networkName", netName)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+ msoLogger.debug(" AAI Query Failed. " + 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 QueryAAINetworkId - " + returnCode
+ msoLogger.debug("Unexpected Response from QueryAAINetworkId - " + dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTReQueryAAINetworkId(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTReQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String netId = networkId
+ networkId = UriUtils.encode(networkId,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+ execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest)
+ msoLogger.debug(Prefix + "requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI ReQuery Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString)
+
+ String netName = utils.getNodeText(aaiResponseAsString, "network-name")
+ String networkOutputs =
+ """<network-outputs>
+ <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)."
+ msoLogger.debug(" AAI ReQuery Failed. - " + 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 ReQueryAAINetworkId - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkVpnBinding(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkVpnBinding() of DoCreateNetworkInstance ***** " )
+
+ try {
+
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Vnf Binding is present, then build a List of vnfBinding
+ List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
+ int vpnCount = vpnBindingUri.size()
+ execution.setVariable(Prefix + "vpnCount", vpnCount)
+ msoLogger.debug(Prefix + "vpnCount - " + vpnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (vpnCount > 0) {
+ execution.setVariable(Prefix + "vpnBindings", vpnBindingUri)
+ msoLogger.debug(" vpnBindingUri List - " + vpnBindingUri)
+
+ String routeTargets = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..vpnBindingUri.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryVpnBindingAAIRequest = ""
+ String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution)
+
+ // Note: By default, the vpnBinding url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1) + "?depth=all"
+ } else {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i] + "?depth=all"
+ }
+
+ } else {
+ // using uri value in URN mapping
+ String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length())
+ if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') {
+ vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1)
+ }
+ queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId + "?depth=all"
+ }
+
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+ msoLogger.debug(Prefix + "queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String routeTarget = ""
+ String routeRole = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-targets")) {
+ String aaiRouteTargets = utils.getNodeXml(aaiResponseAsString, "route-targets", false)
+ def aaiRouteTargetsXml = new XmlSlurper().parseText(aaiRouteTargets)
+ def aaiRouteTarget = aaiRouteTargetsXml.'**'.findAll {it.name() == "route-target"}
+ for (j in 0..aaiRouteTarget.size()-1) {
+ routeTarget = utils.getNodeText(XmlUtil.serialize(aaiRouteTarget[j]), "global-route-target")
+ routeRole = utils.getNodeText(XmlUtil.serialize(aaiRouteTarget[j]), "route-target-role")
+ routeTargets += "<routeTargets>" + '\n' +
+ " <routeTarget>" + routeTarget + "</routeTarget>" + '\n' +
+ " <routeTargetRole>" + routeRole + "</routeTargetRole>" + '\n' +
+ "</routeTargets>" + '\n'
+ }
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from AAINetworkVpnBinding 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 AAINetworkVpnBinding - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "routeCollection", routeTargets)
+ msoLogger.debug(Prefix + "routeCollection - " + '\n' + routeTargets)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <vpn-binding xmlns="${schemaVersion}">
+ <global-route-target/>
+ </vpn-binding>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "routeCollection", "<routeTargets/>")
+ msoLogger.debug(" No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkPolicy(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkPolicy() of DoCreateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Network Policy is present, then build a List of network policy
+ List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
+ int networkPolicyCount = networkPolicyUriList.size()
+ execution.setVariable(Prefix + "networkPolicyCount", networkPolicyCount)
+ msoLogger.debug(Prefix + "networkPolicyCount - " + networkPolicyCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkPolicyCount > 0) {
+ execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList)
+ msoLogger.debug(" networkPolicyUri List - " + networkPolicyUriList)
+
+ String networkPolicies = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..networkPolicyUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryNetworkPolicyAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1) + "?depth=all"
+ } else {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i] + "?depth=all"
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length())
+ println " networkPolicyId - " + networkPolicyId
+ if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') {
+ networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1)
+ }
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId + "?depth=all"
+
+ }
+
+
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+ msoLogger.debug(Prefix + "queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String networkPolicy = ""
+ if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+ networkPolicy = utils.getNodeText(aaiResponseAsString, "network-policy-fqdn")
+ networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkPolicy 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 QueryAAINetworkPolicy - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "networkCollection", networkPolicies)
+ msoLogger.debug(Prefix + "networkCollection - " + '\n' + networkPolicies)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <network-policy xmlns="${schemaVersion}">
+ <network-policy-fqdn/>
+ </network-policy>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "networkCollection", "<policyFqdns/>")
+ msoLogger.debug(" No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkTableRef(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkTableRef() of DoCreateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
+ int networkTableRefCount = networkTableRefUriList.size()
+ execution.setVariable(Prefix + "networkTableRefCount", networkTableRefCount)
+ msoLogger.debug(Prefix + "networkTableRefCount - " + networkTableRefCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkTableRefCount > 0) {
+ execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList)
+ msoLogger.debug(" networkTableRefUri List - " + networkTableRefUriList)
+
+ // AII loop call using list vpnBindings
+ String networkTableRefs = ""
+ for (i in 0..networkTableRefUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using tableRef
+ String queryNetworkTableRefAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1) + "?depth=all"
+ } else {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i] + "?depth=all"
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length())
+
+ if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') {
+ networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1)
+ }
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId + "?depth=all"
+
+ }
+
+
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+ msoLogger.debug(Prefix + "queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String networkTableRef = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+ networkTableRef = utils.getNodeText(aaiResponseAsString, "route-table-reference-fqdn")
+ networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ 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
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "tableRefCollection", networkTableRefs)
+ msoLogger.debug(Prefix + "tableRefCollection - " + '\n' + networkTableRefs)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <route-table-references xmlns="${schemaVersion}">
+ <route-table-reference-fqdn/>
+ </route-table-references>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "tableRefCollection", "<routeTableFqdns/>")
+ msoLogger.debug(" No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTUpdateContrailAAINetwork() of DoCreateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkId = execution.getVariable(Prefix + "networkId")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
+ String createNetworkResponse = execution.getVariable(Prefix + "createNetworkResponse")
+
+ // Prepare url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+ msoLogger.debug(Prefix + "updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest)
+
+ //Prepare payload (PUT)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion)
+ String payloadXml = utils.formatXml(payload)
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml)
+ 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)
+ String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+ if (returnCode=='200') {
+ execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+ msoLogger.debug(" AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString)
+ // Point-of-no-return is set to false, rollback not needed.
+ String rollbackEnabled = execution.getVariable(Prefix + "rollbackEnabled")
+ if (rollbackEnabled == "true") {
+ execution.setVariable(Prefix + "isPONR", false)
+ } else {
+ execution.setVariable(Prefix + "isPONR", true)
+ }
+ msoLogger.debug(Prefix + "isPONR" + ": " + execution.getVariable(Prefix + "isPONR"))
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiUpdateContrailResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode
+ msoLogger.debug(errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCreateNetworkRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareCreateNetworkRequest() of DoCreateNetworkInstance")
+
+ try {
+
+ // get variables
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId == null) {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String source = execution.getVariable(Prefix + "source")
+
+ String requestInput = execution.getVariable(Prefix + "networkRequest")
+ 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")
+ String tableCollection = execution.getVariable(Prefix + "tableRefCollection")
+ String createNetworkRequest = networkUtils.CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source )
+ // Format Response
+ String buildDeleteNetworkRequestAsString = utils.formatXml(createNetworkRequest)
+ buildDeleteNetworkRequestAsString = buildDeleteNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "")
+
+ execution.setVariable(Prefix + "createNetworkRequest", buildDeleteNetworkRequestAsString)
+ msoLogger.debug(Prefix + "createNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareCreateNetworkRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareSDNCRequest() 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")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ 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)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ msoLogger.debug(Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ 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)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ msoLogger.debug(Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCActivateRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCActivateRequest() 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, "activate", "CreateNetworkInstance", cloudRegionId, networkId, null)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ execution.setVariable(Prefix + "activateSDNCRequest", sndcTopologyCreateRequesAsString)
+ msoLogger.debug(Prefix + "activateSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateCreateNetworkResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateNetworkResponse() of DoCreateNetworkInstance")
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "createNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ msoLogger.debug(" Network Adapter create responseCode: " + returnCode)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ execution.setVariable(Prefix + "createNetworkResponse", networkResponse)
+ msoLogger.debug(" Network Adapter create Success Response - " + "\n" + networkResponse)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ rollbackData = rollbackData.replace("rollback>", "networkRollback>")
+ String rollbackNetwork =
+ """<rollbackNetworkRequest>
+ ${rollbackData}
+ </rollbackNetworkRequest>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ msoLogger.debug(" Network Adapter rollback data - " + "\n" + rollbackNetworkXml)
+
+ } else { // network error
+ if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx
+ if (networkResponse.contains("createNetworkError")) {
+ networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+ errorMessage = utils.getNodeText(networkResponse, "message")
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ } else { // CatchAll exception
+ if (returnCode == "500") {
+ errorMessage = "JBWEB000065: HTTP Status 500."
+ } else {
+ errorMessage = "Return code is " + returnCode
+ }
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ }
+
+ } else { // CatchAll exception
+ String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. validateCreateNetworkResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void validateSDNCResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateSDNCResponse() of DoCreateNetworkInstance")
+
+ 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
+ String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "assignSDNCResponse")
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "assignSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", true)
+ msoLogger.debug("Successfully Validated SDNC Response")
+
+ } else {
+ msoLogger.debug("Did NOT Successfully Validated SDNC Response")
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCActivateResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateRpcSDNCActivateResponse() of DoCreateNetworkInstance")
+
+ String response = execution.getVariable(Prefix + "activateSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "activateSDNCResponse")
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "activateSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncActivateRollbackNeeded", true)
+ msoLogger.debug("Successfully Validated Rpc SDNC Activate Response")
+
+ } else {
+ 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")
+
+ 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 assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ 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)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+ msoLogger.debug(" Preparing request for SDNC Topology 'rollback-NetworkActivateRequest' rollback . . . - " + "\n" + sndcTopologyRollbackRequestAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRollbackRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCRollbackRequest() 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 assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ 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 sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "unassign", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ msoLogger.debug(" Preparing request for SDNC Topology 'unassign-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRollbackRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ 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")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String activateSDNCResponse = execution.getVariable(Prefix + "activateSDNCResponse")
+ 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 sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "deactivate", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ msoLogger.debug(" Preparing request for RPC SDNC Topology 'deactivate-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ 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 != "") {
+ rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
+ if (rollbackActivateSDNCRequest != null) {
+ 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"
+ // 2. Success: execution.getVariable("WorkflowException") == null (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) {
+ // set rollback data
+ execution.setVariable("orchestrationStatus", "")
+ execution.setVariable("networkId", execution.getVariable(Prefix + "networkId"))
+ execution.setVariable("networkName", execution.getVariable(Prefix + "networkName"))
+ 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("rollbackData", null)
+ String exceptionMessage = " Exception encountered in MSO Bpmn. "
+ if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
+ msoLogger.debug(" ***** workflowException: " + execution.getVariable("workflowException"))
+ WorkflowException wfex = execution.getVariable("workflowException")
+ exceptionMessage = wfex.getErrorMessage()
+ } else {
+ 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) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ }
+ }
+ String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
+ if (rollbackActivateSDNCRequest != null) {
+ if (rollbackActivateSDNCRequest != "") {
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ }
+ }
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug( "Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..7e00f05b90
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
@@ -0,0 +1,393 @@
+/*-
+ * ============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 groovy.xml.XmlUtil
+
+import groovy.json.*
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+import org.onap.so.logger.MessageEnum
+
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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 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
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class DoCreateNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateNetworkInstanceRollback.class);
+
+ String Prefix="CRENWKIR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", null)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", null)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", null)
+ execution.setVariable(Prefix + "WorkflowException", null)
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "fullRollback", false)
+ execution.setVariable(Prefix + "networkId", "")
+ execution.setVariable(Prefix + "urlRollbackPoNetwork", "")
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of " + className + ".groovy")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request/variables
+ String rollbackNetworkRequest = null
+ String rollbackSDNCRequest = null
+ String rollbackActivateSDNCRequest = null
+
+ // Partial Rollback
+ Map<String, String> rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData != null && rollbackData instanceof Map) {
+
+ if(rollbackData.containsKey("rollbackSDNCRequest")) {
+ rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackNetworkRequest")) {
+ rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackActivateSDNCRequest")) {
+ rollbackActivateSDNCRequest = rollbackData["rollbackActivateSDNCRequest"]
+ }
+
+ }
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest)
+ execution.setVariable(Prefix + "rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ msoLogger.debug("'rollbackData': " + '\n' + execution.getVariable("rollbackData"))
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion? : " + sdncVersion)
+
+ // 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()
+ msoLogger.debug(dataErrorMessage )
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ msoLogger.debug("*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"))
+ if(execution.getVariable(Prefix + "WorkflowException") != null) {
+ // called by: DoCreateNetworkInstance, partial rollback
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ } else {
+ // called by: Macro - Full Rollback, WorkflowException = null
+ execution.setVariable(Prefix + "fullRollback", true)
+
+ }
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callPONetworkAdapter (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside callPONetworkAdapter() of " + className + "")
+
+ try {
+ String poUrl = UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint",execution)
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ String networkId = utils.getNodeText(rollbackSDNCRequest, "network-id")
+
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+
+ String urlRollbackPoNetwork = poUrl+ "/" + networkId + "/rollback"
+ msoLogger.debug("'urlRollbackPoNetwork': " + urlRollbackPoNetwork)
+ execution.setVariable(Prefix + "urlRollbackPoNetwork", urlRollbackPoNetwork)
+
+ RESTConfig config = new RESTConfig(urlRollbackPoNetwork)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/xml").
+ addAuthorizationHeader(execution.getVariable("BasicAuthHeaderValuePO"));
+
+ APIResponse response = client.httpDelete(rollbackNetworkRequest)
+ String responseCode = response.getStatusCode()
+ String responseBody = response.getResponseBodyAsString()
+
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", responseCode)
+ execution.setVariable(Prefix + "rollbackNetworkResponse", responseBody)
+
+ msoLogger.debug(" Network Adapter rollback responseCode: " + responseCode)
+ msoLogger.debug(" Network Adapter rollback responseBody: " + responseBody)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Exception Encountered in callPONetworkAdapter() of DoCreateNetworkInstanceRollback flow - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void validateRollbackResponses (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateRollbackResponses() of DoCreateNetworkInstanceRollback")
+
+ try {
+ // validate PO network rollback response
+ String rollbackNetworkErrorMessages = ""
+ String rollbackNetworkReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) {
+ rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode")
+ String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse")
+ msoLogger.debug(" NetworkRollback Code - " + rollbackNetworkReturnCode)
+ msoLogger.debug(" NetworkRollback Response - " + rollbackNetworkResponse)
+ if (rollbackNetworkReturnCode != "200") {
+ rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+ } else {
+ rollbackNetworkErrorMessages = " + PO Network rollback completed."
+ }
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ String rollbackSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) {
+ rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
+ String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
+ String rollbackSDNCReturnInnerCode = ""
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ rollbackSDNCResponse = rollbackSDNCResponse
+ rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText(rollbackSDNCResponse, "response-code")
+ if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+ rollbackSdncErrorMessages = " + SNDC assign rollback completed."
+ } else {
+ rollbackSdncErrorMessages = " + SDNC assign rollback failed. "
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SNDC assign rollback completed."
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SDNC assign rollback failed. "
+ }
+ msoLogger.debug(" SDNC assign rollback Code - " + rollbackSDNCReturnCode)
+ msoLogger.debug(" SDNC assign rollback Response - " + rollbackSDNCResponse)
+ }
+
+ // validate SDNC activate rollback response
+ String rollbackActivateSdncErrorMessages = ""
+ String rollbackActivateSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackActivateSDNCRequest") != null) {
+ rollbackActivateSDNCReturnCode = execution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")
+ String rollbackActivateSDNCResponse = execution.getVariable(Prefix + "rollbackActivateSDNCResponse")
+ String rollbackActivateSDNCReturnInnerCode = ""
+ rollbackActivateSDNCResponse = rollbackActivateSDNCResponse
+ rollbackActivateSDNCResponse = rollbackActivateSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackActivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackActivateSDNCResponse, "response-code")) {
+ rollbackActivateSDNCReturnInnerCode = utils.getNodeText(rollbackActivateSDNCResponse, "response-code")
+ if (rollbackActivateSDNCReturnInnerCode == "200" || rollbackActivateSDNCReturnInnerCode == "" || rollbackActivateSDNCReturnInnerCode == "0") {
+ rollbackActivateSdncErrorMessages = " + SNDC activate rollback completed."
+ } else {
+ rollbackActivateSdncErrorMessages = " + SDNC activate rollback failed. "
+ }
+ } else {
+ rollbackActivateSdncErrorMessages = " + SNDC activate rollback completed."
+ }
+ } else {
+ rollbackActivateSdncErrorMessages = " + SDNC activate rollback failed. "
+ }
+ msoLogger.debug(" SDNC activate rollback Code - " + rollbackActivateSDNCReturnCode)
+ msoLogger.debug(" SDNC activate rollback Response - " + rollbackActivateSDNCResponse)
+ }
+
+
+ String statusMessage = ""
+ int errorCode = 7000
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+ if (execution.getVariable(Prefix + "fullRollback") == false) {
+ // original WorkflowException,
+ WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException")
+ if (wfe != null) {
+ // rollback due to failure in DoCreate - Partial rollback
+ statusMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ errorCode = '7000'
+ }
+
+ // set if all rolledbacks are successful
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200" && rollbackActivateSDNCReturnCode == "200") {
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("wasDeleted", true)
+
+ } else {
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("wasDeleted", true)
+ }
+
+ statusMessage = statusMessage + rollbackActivateSdncErrorMessages + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+ msoLogger.debug("Final DoCreateNetworkInstanceRollback status message: " + statusMessage)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage);
+ execution.setVariable("workflowException", exception);
+
+ } else {
+ // rollback due to failures in Main flow (Macro) - Full rollback
+ // WorkflowException = null
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200" && rollbackActivateSDNCReturnCode == "200") {
+ execution.setVariable("rollbackSuccessful", true)
+ execution.setVariable("rollbackError", false)
+ } else {
+ String exceptionMessage = "Network Create Rollback was not Successful. "
+ msoLogger.debug(exceptionMessage)
+ execution.setVariable("rollbackSuccessful", false)
+ execution.setVariable("rollbackError", true)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ } catch (Exception ex) {
+ String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
new file mode 100644
index 0000000000..f7c5c1b83d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
@@ -0,0 +1,279 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.codehaus.jackson.map.ObjectMapper
+import org.onap.so.bpmn.infrastructure.properties.BPMNProperties
+
+import java.util.ArrayList
+import java.util.Iterator
+import java.util.List
+import org.apache.commons.lang3.StringUtils
+import org.apache.http.HttpResponse
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.codehaus.groovy.runtime.ArrayUtil
+import org.codehaus.groovy.runtime.ScriptBytecodeAdapter
+import org.codehaus.groovy.runtime.callsite.CallSite
+import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation
+import org.codehaus.groovy.runtime.typehandling.ShortTypeHandling
+import org.json.JSONArray
+import org.json.JSONObject
+import org.onap.so.bpmn.common.recipe.BpmnRestClient
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.NetworkResource
+import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+
+/**
+ * This groovy class supports the <class>DoCreateResources.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ *
+ * @param - addResourceList
+ *
+ * Outputs:
+ * @param - WorkflowException
+
+ */
+public class DoCreateResources extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateResources.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ public void preProcessRequest(DelegateExecution execution)
+ {
+ msoLogger.trace("preProcessRequest ")
+ String msg = ""
+
+ List addResourceList = execution.getVariable("addResourceList")
+ if (addResourceList == null)
+ {
+ msg = "Input addResourceList is null"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else if (addResourceList.size() == 0)
+ {
+ msg = "No resource in addResourceList"
+ msoLogger.info(msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void sequenceResoure(DelegateExecution execution)
+ {
+ msoLogger.trace("Start sequenceResoure Process ")
+
+ String serviceModelUUID = execution.getVariable("modelUuid")
+
+ List<Resource> addResourceList = execution.getVariable("addResourceList")
+
+ List<NetworkResource> networkResourceList = new ArrayList<NetworkResource>()
+
+ List<Resource> sequencedResourceList = new ArrayList<Resource>()
+
+ String serviceDecompose = execution.getVariable("serviceDecomposition")
+ String serviceModelName = jsonUtil.getJsonValue(serviceDecompose, "serviceResources.modelInfo.modelName")
+ def resourceSequence = BPMNProperties.getResourceSequenceProp(serviceModelName)
+
+ if(resourceSequence != null) {
+ // sequence is defined in config file
+ for (resourceType in resourceSequence) {
+ for (resource in addResourceList) {
+ if (StringUtils.containsIgnoreCase(resource.getModelInfo().getModelName(), resourceType)) {
+ sequencedResourceList.add(resource)
+
+ if (resource instanceof NetworkResource) {
+ networkResourceList.add(resource)
+ }
+ }
+ }
+ }
+ } else {
+
+ //define sequenced resource list, we deploy vf first and then network and then ar
+ //this is defaule sequence
+ List<VnfResource> vnfResourceList = new ArrayList<VnfResource>()
+ List<AllottedResource> arResourceList = new ArrayList<AllottedResource>()
+
+ for (Resource rc : addResourceList){
+ if (rc instanceof VnfResource) {
+ vnfResourceList.add(rc)
+ } else if (rc instanceof NetworkResource) {
+ networkResourceList.add(rc)
+ } else if (rc instanceof AllottedResource) {
+ arResourceList.add(rc)
+ }
+ }
+ sequencedResourceList.addAll(vnfResourceList)
+ sequencedResourceList.addAll(networkResourceList)
+ sequencedResourceList.addAll(arResourceList)
+ }
+
+ String isContainsWanResource = networkResourceList.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("sequencedResourceList", sequencedResourceList)
+ msoLogger.info("sequencedResourceList: " + sequencedResourceList)
+ msoLogger.trace("COMPLETED sequenceResoure Process ")
+ }
+
+ public prepareServiceTopologyRequest(DelegateExecution execution) {
+
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start prepareServiceTopologyRequest Process ======== ", isDebugEnabled)
+
+ String serviceDecompose = execution.getVariable("serviceDecomposition")
+
+ execution.setVariable("operationType", "create")
+ execution.setVariable("resourceType", "")
+
+ String serviceInvariantUuid = jsonUtil.getJsonValue(serviceDecompose, "serviceResources.modelInfo.modelInvariantUuid")
+ String serviceUuid = jsonUtil.getJsonValue(serviceDecompose, "serviceResources.modelInfo.modelUuid")
+ String serviceModelName = jsonUtil.getJsonValue(serviceDecompose, "serviceResources.modelInfo.modelName")
+
+ execution.setVariable("modelInvariantUuid", serviceInvariantUuid)
+ execution.setVariable("modelUuid", serviceUuid)
+ execution.setVariable("serviceModelName", serviceModelName)
+
+ utils.log("INFO", "======== End prepareServiceTopologyRequest Process ======== ", isDebugEnabled)
+ }
+
+ public void getCurrentResoure(DelegateExecution execution){
+ msoLogger.trace("Start getCurrentResoure Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
+ Resource currentResource = sequencedResourceList.get(currentIndex)
+ execution.setVariable("resourceType", currentResource.getModelInfo().getModelName())
+ msoLogger.info("Now we deal with resouce:" + currentResource.getModelInfo().getModelName())
+ msoLogger.trace("COMPLETED getCurrentResoure Process ")
+ }
+
+ public void parseNextResource(DelegateExecution execution){
+ msoLogger.trace("Start parseNextResource Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> sequencedResourceList = execution.getVariable("sequencedResourceList")
+ if(nextIndex >= sequencedResourceList.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ msoLogger.trace("COMPLETED parseNextResource Process ")
+ }
+
+ public void prepareResourceRecipeRequest(DelegateExecution execution){
+ msoLogger.trace("Start prepareResourceRecipeRequest Process ")
+ ResourceInput resourceInput = new ResourceInput()
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ String resourceType = execution.getVariable("resourceType")
+ String resourceInstanceName = resourceType + "_" + serviceInstanceName
+ resourceInput.setResourceInstanceName(resourceInstanceName)
+ msoLogger.info("Prepare Resource Request resourceInstanceName:" + resourceInstanceName)
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = "createInstance"
+ resourceInput.setGlobalSubscriberId(globalSubscriberId)
+ resourceInput.setServiceType(serviceType)
+ resourceInput.setServiceInstanceId(serviceInstanceId)
+ resourceInput.setOperationId(operationId)
+ resourceInput.setOperationType(operationType);
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
+ Resource currentResource = sequencedResourceList.get(currentIndex)
+ resourceInput.setResourceModelInfo(currentResource.getModelInfo());
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
+
+ String incomingRequest = execution.getVariable("uuiRequest")
+ //set the requestInputs from tempalte To Be Done
+ String serviceModelUuid = jsonUtil.getJsonValue(incomingRequest,"service.serviceUuid")
+ String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
+ String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters)
+ resourceInput.setResourceParameters(resourceParameters)
+ execution.setVariable("resourceInput", resourceInput)
+ msoLogger.trace("COMPLETED prepareResourceRecipeRequest Process ")
+ }
+
+ public void executeResourceRecipe(DelegateExecution execution){
+ msoLogger.trace("Start executeResourceRecipe Process ")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceType = execution.getVariable("serviceType")
+ ResourceInput resourceInput = execution.getVariable("resourceInput")
+
+ // requestAction is action, not opertiontype
+ //String requestAction = resourceInput.getOperationType()
+ String requestAction = "createInstance"
+ JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceInput.getResourceModelInfo().getModelUuid(), requestAction)
+
+ if (resourceRecipe != null) {
+ String recipeURL = BPMNProperties.getProperty("bpelURL", "http://mso:8080") + resourceRecipe.getString("orchestrationUri")
+ int recipeTimeOut = resourceRecipe.getInt("recipeTimeout")
+ String recipeParamXsd = resourceRecipe.get("paramXSD")
+ HttpResponse resp = BpmnRestClient.post(recipeURL, requestId, recipeTimeOut, requestAction, serviceInstanceId, serviceType, resourceInput.toString(), recipeParamXsd)
+ } else {
+ String exceptionMessage = "Resource receipe is not found for resource modeluuid: " +
+ resourceInput.getResourceModelInfo().getModelUuid()
+ utils.log("ERROR", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, exceptionMessage)
+ }
+
+ msoLogger.trace("======== end executeResourceRecipe Process ======== ")
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Error occured within DoCreateResources executeResourceRecipe method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured during DoCreateResources executeResourceRecipe Catalog")
+ }
+ }
+
+ public void postConfigRequest(DelegateExecution execution){
+ //now do noting
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
new file mode 100644
index 0000000000..93a260a544
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -0,0 +1,795 @@
+/*-
+ * ============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.aai.domain.yang.OwningEntity
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.ServiceInstance
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources
+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 groovy.json.*
+
+/**
+ * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - subscriptionServiceType
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceModelInfo
+ * @param - productFamilyId
+ * @param - disableRollback
+ * @param - failExists - TODO
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion ("1610")
+ * @param - serviceDecomposition - Decomposition for R1710
+ * (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
+ *
+ * Outputs:
+ * @param - rollbackData (localRB->null)
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ * @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)
+ */
+public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateServiceInstance.class);
+ String Prefix="DCRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ msoLogger.trace("preProcessRequest")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix", Prefix)
+
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+
+ //requestDetails.requestParameters. for SDNC assignTopology
+ String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
+
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ 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"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ //requestDetails.modelInfo.for AAI PUT servieInstanceData & SDNC assignTopology
+ String modelInvariantUuid = ""
+ String modelVersion = ""
+ String modelUuid = ""
+ String modelName = ""
+ 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)
+ {
+ serviceInstanceId = serviceInstance.getInstanceId() ?: ""
+ serviceInstanceName = serviceInstance.getInstanceName() ?: ""
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+ }
+
+ ModelInfo modelInfo = serviceDecomp.getModelInfo()
+ if (modelInfo != null)
+ {
+ modelInvariantUuid = modelInfo.getModelInvariantUuid() ?: ""
+ modelVersion = modelInfo.getModelVersion() ?: ""
+ modelUuid = modelInfo.getModelUuid() ?: ""
+ modelName = modelInfo.getModelName() ?: ""
+ }
+ else
+ {
+ msg = "Input serviceModelInfo is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }
+ else
+ {
+ //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)
+
+ execution.setVariable("modelInvariantUuid", modelInvariantUuid)
+ 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)
+ List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*"));
+ boolean isSdncService= false
+ 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(!isSdncService){
+ execution.setVariable("sendToSDNC", false)
+ //alacarte non-sdnc svcs must provide name (sdnc provides name for rest)
+ if (isBlank(execution.getVariable("serviceInstanceName" )))
+ {
+ msg = "Input serviceInstanceName must be provided for alacarte"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }
+ }
+
+ 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)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+
+ //AAI PUT
+ String oStatus = execution.getVariable("initialStatus") ?: "Active"
+ if ("TRANSPORT".equalsIgnoreCase(serviceType))
+ {
+ oStatus = "Created"
+ }
+
+ 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)
+ msoLogger.debug("Workload Context is: "+ workloadContext)
+ }catch(BpmnError e){
+ throw e
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ //Create AAI Payload
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String serviceInstanceData =
+ """<service-instance xmlns=\"${namespace}\">
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ ${serviceTypeLine}
+ ${serviceRoleLine}
+ ${statusLine}
+ <model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <environment-context>${MsoUtils.xmlEscape(environmentContext)}</environment-context>
+ <workload-context>${MsoUtils.xmlEscape(workloadContext)}</workload-context>
+ </service-instance>""".trim()
+
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ msoLogger.debug(" 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ 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")
+ String msg = ""
+ try {
+
+ String globalCustomerId = execution.getVariable("globalSubscriberId") //VID to AAI name map
+ msoLogger.debug(" ***** getAAICustomerById ***** globalCustomerId:" + globalCustomerId)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ if (isBlank(aai_endpoint) || isBlank(aai_uri))
+ {
+ msg = "AAI URL is invalid. Endpoint:" + aai_endpoint + aai_uri
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ String getAAICustomerUrl = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8")
+
+ msoLogger.debug("getAAICustomerById Url:" + getAAICustomerUrl)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getAAICustomerUrl)
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msg = "getAAICustomerById ResponseCode:" + returnCode + " ResponseString:" + aaiResponseAsString
+ msoLogger.debug(msg)
+
+ if (returnCode=='200') {
+ // Customer found by ID. FLow to proceed.
+ msoLogger.debug(msg)
+
+ //TODO Deferred
+ //we might verify that service-subscription with matching name exists
+ //and throw error if not. If not checked, we will get exception in subsequent step on Create call
+ //in 1610 we assume both customer & service subscription were pre-created
+
+ } else {
+ if (returnCode=='404') {
+ msg = "GlobalCustomerId:" + globalCustomerId + " not found (404) in AAI"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, aaiResponseAsString, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", workflowException)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ msg = "Error in getAAICustomerById ResponseCode:" + returnCode
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in getAAICustomerById. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit getAAICustomerById")
+
+ }
+
+ 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")
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(!succInAAI){
+ msoLogger.debug("Error putting Service-instance in AAI", + serviceInstanceId)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ }
+ else
+ {
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
+ rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
+ rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)
+ rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType"))
+ rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIPUT")
+ }
+
+ public void preProcessSDNCAssignRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ msoLogger.trace("preProcessSDNCAssignRequest")
+
+ try {
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def serviceInstanceName = execution.getVariable("serviceInstanceName")
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("productFamilyId")
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ def msoAction = ""
+
+ def modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ 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"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${MsoUtils.xmlEscape(msoAction)}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>CreateServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-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>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ ${siParamsXml}
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncAssignRequest:\n" + sdncAssignRequest)
+ sdncAssignRequest = utils.formatXml(sdncAssignRequest)
+ execution.setVariable("sdncAssignRequest", sdncAssignRequest)
+ msoLogger.debug("sdncAssignRequest: " + sdncAssignRequest)
+
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncDelete = sdncAssignRequest.replace(">assign<", ">delete<").replace(">CreateServiceInstance<", ">DeleteServiceInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def sdncRequestId3 = UUID.randomUUID().toString()
+ String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId2}<", ">${sdncRequestId3}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate)
+ rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCAssignRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessSDNCAssignRequest")
+ }
+
+ public void postProcessSDNCAssign (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("postProcessSDNCAssign")
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ String response = execution.getVariable("sdncAdapterResponse")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Good response from SDNC Adapter for service-instance topology assign: \n" + response)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "rollbackSDNC", "true")
+ execution.setVariable("rollbackData", rollbackData)
+
+ }else{
+ msoLogger.debug("Bad Response from SDNC Adapter for service-instance assign")
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNCAssign. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessSDNCAssign")
+ }
+
+ public void postProcessAAIGET2(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("postProcessAAIGET2")
+ String msg = ""
+
+ try {
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(!succInAAI){
+ msoLogger.debug("Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ msg = "Failure in postProcessAAIGET2 GENGS_SuccessIndicator:" + succInAAI
+ msoLogger.debug(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, "service-instance-name"))) {
+ execution.setVariable("serviceInstanceName", utils.getNodeText(aaiService, "service-instance-name"))
+ msoLogger.debug("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"))
+ }
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIGET2")
+ }
+
+ public void preProcessRollback (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("preProcessRollback")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ msoLogger.trace("postProcessRollback")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ 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 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{
+ try{
+ AAICreateResources aaiCR = new AAICreateResources()
+ aaiCR.createAAIProject(projectName, serviceInstance)
+ }catch(Exception ex){
+ String msg = "Exception in createProject. " + ex.getMessage();
+ msoLogger.debug(msg)
+ 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 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.";
+ throw new IllegalStateException();
+ }else{
+ if(aaiCR.existsOwningEntity(owningEntityId)){
+ aaiCR.connectOwningEntityandServiceInstance(owningEntityId,serviceInstance)
+ }else{
+ if(owningEntityName==null||owningEntityName.equals("")){
+ msg = "Exception in createOwningEntity. Can't create an owningEntity without an owningEntityName in input.";
+ throw new IllegalStateException();
+ }else{
+ Optional<OwningEntity> owningEntity = aaiCR.getOwningEntityNames(owningEntityName);
+ if(owningEntity.isPresent()){
+ msg = "Exception in createOwningEntity. Can't create OwningEntity as name already exists in AAI associated with a different owning-entity-id (name must be unique).";
+ throw new IllegalStateException();
+ } else {
+ aaiCR.createAAIOwningEntity(owningEntityId, owningEntityName, serviceInstance)
+ }
+ }
+ }
+ }
+ }catch(Exception ex){
+ msoLogger.debug(msg)
+ msoLogger.error(ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.trace("Completed processJavaException Method in DoCreateServiceInstance")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
new file mode 100644
index 0000000000..dd56b8f2cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
@@ -0,0 +1,242 @@
+/*-
+ * ============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 groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+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.logger.MsoLogger
+import org.onap.so.logger.MessageEnum
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+/**
+ * This groovy class supports the <class>DoCreateServiceInstanceRollback.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - rollbackData with
+ * globalCustomerId
+ * subscriptionServiceType
+ * serviceInstanceId
+ * disableRollback
+ * rollbackAAI
+ * rollbackSDNC
+ * sdncRollbackRequest
+ *
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateServiceInstanceRollback.class);
+
+
+ String Prefix="DCRESIRB_"
+
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ msoLogger.trace("preProcessRequest")
+ execution.setVariable("rollbackAAI",false)
+ execution.setVariable("rollbackSDNC",false)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType("SERVICEINSTANCE")) {
+
+ def serviceInstanceId = rollbackData.get("SERVICEINSTANCE", "serviceInstanceId")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ def subscriptionServiceType = rollbackData.get("SERVICEINSTANCE", "subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+
+ def globalSubscriberId = rollbackData.get("SERVICEINSTANCE", "globalSubscriberId")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+
+ def rollbackAAI = rollbackData.get("SERVICEINSTANCE", "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ }
+
+ def rollbackSDNC = rollbackData.get("SERVICEINSTANCE", "rollbackSDNC")
+ if ("true".equals(rollbackSDNC))
+ {
+ execution.setVariable("rollbackSDNC", true)
+ }
+
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackSDNC") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ def sdncDelete = rollbackData.get("SERVICEINSTANCE", "sdncDelete")
+ execution.setVariable("sdncDelete", sdncDelete)
+ def sdncDeactivate = rollbackData.get("SERVICEINSTANCE", "sdncDeactivate")
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ msoLogger.debug("sdncDeactivate:\n" + sdncDeactivate)
+ msoLogger.debug("sdncDelete:\n" + sdncDelete)
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance Rollback preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest")
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method) {
+
+ msoLogger.trace("validateSDNCResponse")
+ String msg = ""
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msg = "SDNC Adapter service-instance rollback successful for " + method
+ msoLogger.debug(msg)
+ }else{
+ execution.setVariable("rolledBack", false)
+ msg = "Error Response from SDNC Adapter service-instance rollback for " + method
+ execution.setVariable("rollbackError", msg)
+ msoLogger.debug(msg)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance rollback for " + method + " Exception:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit validateSDNCResponse")
+ }
+
+ public void postProcessRequest(DelegateExecution execution) {
+
+ msoLogger.trace("postProcessRequest")
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean rollbackAAI = execution.getVariable("rollbackAAI")
+ boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
+ if (rollbackAAI || rollbackSDNC)
+ {
+ execution.setVariable("rolledBack", true)
+ }
+ if (rollbackAAI)
+ {
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(!succInAAI){
+ execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
+ execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
+ msoLogger.debug("Error deleting service-instance in AAI for rollback", + serviceInstanceId)
+ }
+ }
+ msoLogger.trace("Exit postProcessRequest")
+
+ } catch (BpmnError e) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + e.getMessage()
+ msoLogger.debug(msg)
+ } catch (Exception ex) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+
+ }
+
+ public void processRollbackException(DelegateExecution execution){
+
+ msoLogger.trace("processRollbackException")
+ try{
+ msoLogger.debug("Caught an Exception in DoCreateServiceInstanceRollback")
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught exception in ServiceInstance Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ msoLogger.debug("BPMN Error during processRollbackExceptions Method: ")
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processRollbackExceptions Method: " + e.getMessage())
+ }
+
+ msoLogger.debug("Exit processRollbackException")
+ }
+
+ public void processRollbackJavaException(DelegateExecution execution){
+
+ msoLogger.trace("processRollbackJavaException")
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught Java exception in ServiceInstance Create Rollback")
+ msoLogger.debug("Caught Exception in processRollbackJavaException")
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception in processRollbackJavaException " + e.getMessage())
+ }
+ msoLogger.trace("Exit processRollbackJavaException")
+ }
+
+}
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
new file mode 100644
index 0000000000..6e1a5dcb55
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollbackV2.groovy
@@ -0,0 +1,72 @@
+/*-
+ * ============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
new file mode 100644
index 0000000000..8af8e6ba1b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceV2.groovy
@@ -0,0 +1,104 @@
+/*-
+ * ============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/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
new file mode 100644
index 0000000000..10f6acd403
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
@@ -0,0 +1,282 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - SO
+ * ================================================================================
+ * 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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+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.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DoCreateVFCNetworkServiceInstance.bpmn</class> process.
+ * flow for VFC Network Service Create
+ */
+public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVFCNetworkServiceInstance.class);
+
+ String vfcUrl = "/vfc/rest/v1/vfcadapter"
+
+ String host = "http://mso.mso.testlab.openecomp.org:8080"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ * generate the nsParameters
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ String msg = ""
+ msoLogger.trace("preProcessRequest()")
+ try {
+ //deal with nsName and Description
+ String nsServiceName = execution.getVariable("nsServiceName")
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ msoLogger.debug("nsServiceName:" + nsServiceName + " nsServiceDescription:" + nsServiceDescription)
+ //deal with operation key
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ msoLogger.debug("globalSubscriberId:" + globalSubscriberId)
+ String serviceType = execution.getVariable("serviceType")
+ msoLogger.debug("serviceType:" + serviceType)
+ String serviceId = execution.getVariable("serviceId")
+ msoLogger.debug("serviceId:" + serviceId)
+ String operationId = execution.getVariable("operationId")
+ msoLogger.debug("serviceType:" + serviceType)
+ String nodeTemplateUUID = execution.getVariable("resourceUUID")
+ msoLogger.debug("nodeTemplateUUID:" + nodeTemplateUUID)
+ /*
+ * segmentInformation needed as a object of segment
+ * {
+ * "domain":"",
+ * "nodeTemplateName":"",
+ * "nodeType":"",
+ * "nsParameters":{
+ * //this is the nsParameters sent to VF-C
+ * }
+ * }
+ */
+ String nsParameters = execution.getVariable("resourceParameters")
+ msoLogger.debug("nsParameters:" + nsParameters)
+ String nsOperationKey = """{
+ "globalSubscriberId":"${globalSubscriberId}",
+ "serviceType":"${serviceType}",
+ "serviceId":"${serviceId}",
+ "operationId":"${operationId}",
+ "nodeTemplateUUID":"${nodeTemplateUUID}"
+ }"""
+ execution.setVariable("nsOperationKey", nsOperationKey);
+ execution.setVariable("nsParameters", nsParameters)
+
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest")
+ }
+
+ /**
+ * create NS task
+ */
+ public void createNetworkService(DelegateExecution execution) {
+ msoLogger.trace("createNetworkService")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String nsParameters = execution.getVariable("nsParameters");
+ String nsServiceName = execution.getVariable("nsServiceName")
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ String reqBody ="""{
+ "nsServiceName":"${nsServiceName}",
+ "nsServiceDescription":"${nsServiceDescription}",
+ "nsOperationKey":${nsOperationKey},
+ "nsParameters":${nsParameters}
+ }"""
+ APIResponse apiResponse = postRequest(execution, host + vfcUrl + "/ns", reqBody)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String nsInstanceId = "";
+ if(returnCode== "200" || returnCode == "201"){
+ nsInstanceId = jsonUtil.getJsonValue(aaiResponseAsString, "nsInstanceId")
+ }
+ execution.setVariable("nsInstanceId", nsInstanceId)
+ msoLogger.trace("Exit createNetworkService")
+ }
+
+ /**
+ * instantiate NS task
+ */
+ public void instantiateNetworkService(DelegateExecution execution) {
+ msoLogger.trace("instantiateNetworkService")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String nsParameters = execution.getVariable("nsParameters");
+ String nsServiceName = execution.getVariable("nsServiceName")
+ String nsServiceDescription = execution.getVariable("nsServiceDescription")
+ String reqBody ="""{
+ "nsServiceName":"${nsServiceName}",
+ "nsServiceDescription":"${nsServiceDescription}",
+ "nsOperationKey":${nsOperationKey},
+ "nsParameters":${nsParameters}
+ }"""
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ String url = host + vfcUrl + "/ns/" +nsInstanceId + "/instantiate"
+ APIResponse apiResponse = postRequest(execution, url, reqBody)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String jobId = "";
+ if(returnCode== "200"|| returnCode == "201"){
+ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
+ }
+ execution.setVariable("jobId", jobId)
+ msoLogger.trace("Exit instantiateNetworkService")
+ }
+
+ /**
+ * query NS task
+ */
+ public void queryNSProgress(DelegateExecution execution) {
+ msoLogger.trace("queryNSProgress")
+ String jobId = execution.getVariable("jobId")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String url = host + vfcUrl + "/jobs/" + jobId
+ APIResponse apiResponse = postRequest(execution, url, nsOperationKey)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String operationStatus = "error"
+ if(returnCode== "200"|| returnCode == "201"){
+ operationStatus = jsonUtil.getJsonValue(aaiResponseAsString, "responseDescriptor.status")
+ }
+ execution.setVariable("operationStatus", operationStatus)
+ msoLogger.trace("Exit queryNSProgress")
+ }
+
+ /**
+ * delay 5 sec
+ */
+ public void timeDelay(DelegateExecution execution) {
+ try {
+ Thread.sleep(5000);
+ } catch(InterruptedException e) {
+ msoLogger.debug("Time Delay exception" + e )
+ }
+ }
+
+ /**
+ * finish NS task
+ */
+ public void addNSRelationship(DelegateExecution execution) {
+ msoLogger.trace("addNSRelationship")
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ if(nsInstanceId == null || nsInstanceId == ""){
+ msoLogger.debug(" create NS failed, so do not need to add relationship")
+ return
+ }
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceId = execution.getVariable("serviceId")
+ String addRelationPayload = """<relationship xmlns="http://org.openecomp.aai.inventory/v11">
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(globalSubscriberId)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(serviceType)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(nsInstanceId)}</relationship-value>
+ </relationship-data>
+ </relationship>"""
+ String endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ msoLogger.debug("Add Relationship req:\n" + addRelationPayload)
+ String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship"
+ APIResponse aaiRsp = executeAAIPutCall(execution, url, addRelationPayload)
+ msoLogger.debug("aai response status code:" + aaiRsp.getStatusCode())
+ msoLogger.debug("aai response content:" + aaiRsp.getResponseBodyAsString())
+ msoLogger.trace("Exit addNSRelationship")
+ }
+
+ public APIResponse executeAAIPutCall(DelegateExecution execution, String url, String payload){
+ msoLogger.trace("Started Execute AAI Put Process")
+ APIResponse apiResponse = null
+ try{
+ String uuid = utils.getRequestID()
+ msoLogger.debug("Generated uuid is: " + uuid)
+ msoLogger.debug("URL to be used is: " + url)
+ String userName = UrnPropertiesReader.getVariable("aai.auth", execution)
+ String password = UrnPropertiesReader.getVariable("mso.msoKey", execution)
+ String basicAuthCred = utils.getBasicAuth(userName,password)
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/xml").addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ apiResponse = client.httpPut(payload)
+ msoLogger.trace("Completed Execute AAI Put Process")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing AAI Put Call", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ /**
+ * post request
+ * url: the url of the request
+ * requestBody: the body of the request
+ */
+ private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){
+ msoLogger.trace("Started Execute VFC adapter Post Process")
+ msoLogger.debug("url:"+url +"\nrequestBody:"+ requestBody)
+ APIResponse apiResponse = null
+ try{
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Accept","application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk");
+ apiResponse = client.httpPost(requestBody)
+ msoLogger.debug("response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString())
+ msoLogger.trace("Completed Execute VF-C adapter Post Process")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing AAI Post Call", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
new file mode 100644
index 0000000000..59d38bfe86
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -0,0 +1,2133 @@
+/*-
+ * ============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 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.json.JSONArray
+import org.json.JSONObject
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VfModuleBase
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.CloudFlavor
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.DecomposeJsonUtil
+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.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.springframework.web.util.UriUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+
+import com.fasterxml.jackson.databind.ObjectMapper
+
+
+
+public class DoCreateVfModule extends VfModuleBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVfModule.class);
+
+ String Prefix="DCVFM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ CatalogDbUtils catalog = new CatalogDbUtils()
+ DecomposeJsonUtil decomposeJsonUtils = new DecomposeJsonUtil()
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ execution.setVariable('prefix', Prefix)
+ try{
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("DCVFM_vnfParamsExistFlag", false)
+ execution.setVariable("DCVFM_oamManagementV4Address", "")
+ execution.setVariable("DCVFM_oamManagementV6Address", "")
+
+ String request = execution.getVariable("DoCreateVfModuleRequest")
+
+ if (request == null || request.isEmpty()) {
+ // Building Block-type request
+
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ msoLogger.debug("serviceModelInfo: " + serviceModelInfo)
+ String modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ msoLogger.debug("modelInvariantUuid: " + modelInvariantUuid)
+
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ //tenantId
+ def tenantId = execution.getVariable("tenantId")
+ execution.setVariable("DCVFM_tenantId", tenantId)
+ rollbackData.put("VFMODULE", "tenantid", tenantId)
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("volumeGroupId")
+ execution.setVariable("DCVFM_volumeGroupId", volumeGroupId)
+ //volumeGroupName
+ def volumeGroupName = execution.getVariable("volumeGroupName")
+ execution.setVariable("DCVFM_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
+ rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
+ msoLogger.debug("cloudSiteId: " + cloudSiteId)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DCVFM_vnfType", vnfType)
+ rollbackData.put("VFMODULE", "vnftype", vnfType)
+ msoLogger.debug("vnfType: " + vnfType)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DCVFM_vnfName", vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ msoLogger.debug("vnfName: " + vnfName)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DCVFM_vnfId", vnfId)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ msoLogger.debug("vnfId: " + vnfId)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+ rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+ msoLogger.debug("vfModuleName: " + vfModuleName)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+ rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+ msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
+ execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
+ rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
+ msoLogger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ msoLogger.debug("vfModuleId: " + vfModuleId)
+ def requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("DCVFM_requestId", requestId)
+ msoLogger.debug("requestId: " + requestId)
+ rollbackData.put("VFMODULE", "msorequestid", requestId)
+ // Set mso-request-id to request-id for VNF Adapter interface
+ execution.setVariable("mso-request-id", requestId)
+ //serviceId
+ def serviceId = execution.getVariable("serviceId")
+ execution.setVariable("DCVFM_serviceId", serviceId)
+ msoLogger.debug("serviceId: " + serviceId)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+ msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+ //flavorList
+ ArrayList<CloudFlavor> flavorList = execution.getVariable(cloudSiteId + "_flavorList")
+ if (flavorList != null) {
+ execution.setVariable("DCVFM_flavorList", flavorList)
+ logDebug("flavorList is: " + flavorList, isDebugLogEnabled)
+ }
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ msoLogger.debug("source: " + source)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback == true) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ msoLogger.debug("backoutOnFailure: " + backoutOnFailure)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+ msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
+ //personaModelId
+ execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantUuid"))
+ //personaModelVersion
+ execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelUuid"))
+ //vfModuleLabel
+ def vfModuleLabel = execution.getVariable("vfModuleLabel")
+ if (vfModuleLabel != null) {
+ execution.setVariable("DCVFM_vfModuleLabel", vfModuleLabel)
+ msoLogger.debug("vfModuleLabel: " + vfModuleLabel)
+ }
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DCVFM_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ msoLogger.debug("Generated messageId (UUID) is: " + uuid)
+ }else{
+ msoLogger.debug("Found messageId (UUID) is: " + uuid)
+ }
+ //isVidRequest
+ String isVidRequest = execution.getVariable("isVidRequest")
+ // default to true
+ if (isVidRequest == null || isVidRequest.isEmpty()) {
+ execution.setVariable("isVidRequest", "true")
+ }
+ //globalSubscriberId
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ execution.setVariable("DCVFM_globalSubscriberId", globalSubscriberId)
+ msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
+ Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams")
+ if (vfModuleInputParams != null) {
+ execution.setVariable("DCVFM_vnfParamsMap", vfModuleInputParams)
+ execution.setVariable("DCVFM_vnfParamsExistFlag", true)
+ }
+ //usePreload
+ def usePreload = execution.getVariable("usePreload")
+ execution.setVariable("DCVFM_usePreload", usePreload)
+ msoLogger.debug("usePreload: " + usePreload)
+ //aLaCarte
+ def aLaCarte = execution.getVariable("aLaCarte")
+ execution.setVariable("DCVFM_aLaCarte", aLaCarte)
+ msoLogger.debug("aLaCarte: " + aLaCarte)
+
+ //get workload and environment context from parent SI
+ String environmentContext = ""
+ String workloadContext =""
+ String serviceType =""
+
+ try{
+ String json = catalog.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
+ serviceType = jsonUtil.getJsonValue(json, "serviceResources.serviceType")
+ }catch(BpmnError e){
+ throw e
+ } catch (Exception ex){
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ try{
+ AAIUri serviceInstanceURI = AAIUriFactory.create(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,serviceType,serviceInstanceId)
+ AAIResourcesClient aaiRC = new AAIResourcesClient()
+ AAIResultWrapper aaiRW = aaiRC.get(serviceInstanceURI)
+ Map<String, Object> aaiJson = aaiRW.asMap()
+ environmentContext = aaiJson.getOrDefault("environment-context","")
+ workloadContext = aaiJson.getOrDefault("workload-context","")
+
+ }catch (Exception ex) {
+ msoLogger.debug("Error retreiving parent service instance information")
+ }
+
+ execution.setVariable("DCVFM_environmentContext",environmentContext)
+ execution.setVariable("DCVFM_workloadContext",workloadContext)
+
+ }
+ else {
+ // The info is inside the request - DEAD CODE
+ msoLogger.debug("DoCreateVfModule request: " + request)
+
+ //tenantId
+ def tenantId = ""
+ if (utils.nodeExists(request, "tenant-id")) {
+ tenantId = utils.getNodeText(request, "tenant-id")
+ }
+ execution.setVariable("DCVFM_tenantId", tenantId)
+ rollbackData.put("VFMODULE", "tenantid", tenantId)
+ //volumeGroupId
+ def volumeGroupId = ""
+ if (utils.nodeExists(request, "volume-group-id")) {
+ volumeGroupId = utils.getNodeText(request, "volume-group-id")
+ }
+ execution.setVariable("DCVFM_volumeGroupId", volumeGroupId)
+ //volumeGroupId
+ def volumeGroupName = ""
+ if (utils.nodeExists(request, "volume-group-name")) {
+ volumeGroupName = utils.getNodeText(request, "volume-group-name")
+ }
+ execution.setVariable("DCVFM_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = ""
+ if (utils.nodeExists(request, "aic-cloud-region")) {
+ cloudSiteId = utils.getNodeText(request, "aic-cloud-region")
+ }
+ execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
+ rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
+ msoLogger.debug("cloudSiteId: " + cloudSiteId)
+ //vnfType
+ def vnfType = ""
+ if (utils.nodeExists(request, "vnf-type")) {
+ vnfType = utils.getNodeText(request, "vnf-type")
+ }
+ execution.setVariable("DCVFM_vnfType", vnfType)
+ rollbackData.put("VFMODULE", "vnftype", vnfType)
+ msoLogger.debug("vnfType: " + vnfType)
+ //vnfName
+ def vnfName = ""
+ if (utils.nodeExists(request, "vnf-name")) {
+ vnfName = utils.getNodeText(request, "vnf-name")
+ }
+ execution.setVariable("DCVFM_vnfName", vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ msoLogger.debug("vnfName: " + vnfName)
+ //vnfId
+ def vnfId = ""
+ if (utils.nodeExists(request, "vnf-id")) {
+ vnfId = utils.getNodeText(request, "vnf-id")
+ }
+ execution.setVariable("DCVFM_vnfId", vnfId)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ msoLogger.debug("vnfId: " + vnfId)
+ //vfModuleName
+ def vfModuleName = ""
+ if (utils.nodeExists(request, "vf-module-name")) {
+ vfModuleName = utils.getNodeText(request, "vf-module-name")
+ }
+ execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+ rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+ msoLogger.debug("vfModuleName: " + vfModuleName)
+ //vfModuleModelName
+ def vfModuleModelName = ""
+ if (utils.nodeExists(request, "vf-module-model-name")) {
+ vfModuleModelName = utils.getNodeText(request, "vf-module-model-name")
+ }
+ execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+ rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+ msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = ""
+ if (utils.nodeExists(request, "model-customization-id")) {
+ modelCustomizationUuid = utils.getNodeText(request, "model-customization-id")
+ }
+ execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
+ rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
+ msoLogger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
+ //vfModuleId
+ def vfModuleId = ""
+ if (utils.nodeExists(request, "vf-module-id")) {
+ vfModuleId = utils.getNodeText(request, "vf-module-id")
+ }
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ msoLogger.debug("vfModuleId: " + vfModuleId)
+ def requestId = ""
+ if (utils.nodeExists(request, "request-id")) {
+ requestId = utils.getNodeText(request, "request-id")
+ }
+ execution.setVariable("DCVFM_requestId", requestId)
+ msoLogger.debug("requestId: " + requestId)
+ //serviceId
+ def serviceId = ""
+ if (utils.nodeExists(request, "service-id")) {
+ serviceId = utils.getNodeText(request, "service-id")
+ }
+ execution.setVariable("DCVFM_serviceId", serviceId)
+ msoLogger.debug("serviceId: " + serviceId)
+ //serviceInstanceId
+ def serviceInstanceId = ""
+ if (utils.nodeExists(request, "service-instance-id")) {
+ serviceInstanceId = utils.getNodeText(request, "service-instance-id")
+ }
+ execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+ msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+ //source
+ def source = ""
+ if (utils.nodeExists(request, "source")) {
+ source = utils.getNodeText(request, "source")
+ }
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ msoLogger.debug("source: " + source)
+ //backoutOnFailure
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ msoLogger.debug("backoutOnFailure: " + backoutOnFailure)
+ //isBaseVfModule
+ def isBaseVfModule = "false"
+ if (utils.nodeExists(request, "is-base-vf-module")) {
+ isBaseVfModule = utils.getNodeText(request, "is-base-vf-module")
+ }
+ execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+ msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = ""
+ if (utils.nodeExists(request, "asdc-service-model-version")) {
+ asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
+ }
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
+
+ //personaModelId
+ def personaModelId = ""
+ if (utils.nodeExists(request, "persona-model-id")) {
+ personaModelId = utils.getNodeText(request, "persona-model-id")
+ }
+ execution.setVariable("DCVFM_personaModelId", personaModelId)
+ msoLogger.debug("personaModelId: " + personaModelId)
+
+ //personaModelVersion
+ def personaModelVersion = ""
+ if (utils.nodeExists(request, "persona-model-version")) {
+ personaModelVersion = utils.getNodeText(request, "persona-model-version")
+ }
+ execution.setVariable("DCVFM_personaModelVersion", personaModelVersion)
+ msoLogger.debug("personaModelVersion: " + personaModelVersion)
+
+ // Process the parameters
+
+ String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
+ if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+ msoLogger.debug("Request contains NO VNF Params")
+ }else{
+ msoLogger.debug("Request does contain VNF Params")
+ execution.setVariable("DCVFM_vnfParamsExistFlag", true)
+
+ InputSource xmlSource = new InputSource(new StringReader(request));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document xml = docBuilder.parse(xmlSource)
+ //Get params, build map
+ Map<String, String> paramsMap = new HashMap<String, String>()
+ NodeList paramsList = xml.getElementsByTagNameNS("*", "param")
+
+ for (int z = 0; z < paramsList.getLength(); z++) {
+ Node node = paramsList.item(z)
+ String paramValue = node.getTextContent()
+ NamedNodeMap e = node.getAttributes()
+ String paramName = e.getNamedItem("name").getTextContent()
+ paramsMap.put(paramName, paramValue)
+ }
+ execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
+ }
+ }
+
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DCVFM_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ msoLogger.debug("Generated messageId (UUID) is: " + uuid)
+ }else{
+ msoLogger.debug("Found messageId (UUID) is: " + uuid)
+ }
+ // Get sdncVersion, default to empty
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = ""
+ }
+ msoLogger.debug("sdncVersion: " + sdncVersion)
+ execution.setVariable("DCVFM_sdncVersion", sdncVersion)
+
+ execution.setVariable("DCVFM_uuid", uuid)
+ execution.setVariable("DCVFM_baseVfModuleId", "")
+ execution.setVariable("DCVFM_baseVfModuleHeatStackId", "")
+ execution.setVariable("DCVFM_heatStackId", "")
+ execution.setVariable("DCVFM_contrailServiceInstanceFqdn", "")
+ execution.setVariable("DCVFM_volumeGroupStackId", "")
+ execution.setVariable("DCVFM_cloudRegionForVolume", "")
+ execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", "")
+ execution.setVariable("DCVFM_vnfTypeToQuery", "generic-vnf")
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "false")
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "false")
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "false")
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "false")
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "false")
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "false")
+ rollbackData.put("VFMODULE", "heatstackid", "")
+
+ String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, msg);
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
+
+
+ execution.setVariable("rollbackData", rollbackData)
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ }
+
+ /**
+ * Validates a workflow response.
+ * @param execution the execution
+ * @param responseVar the execution variable in which the response is stored
+ * @param responseCodeVar the execution variable in which the response code is stored
+ * @param errorResponseVar the execution variable in which the error response is stored
+ */
+ public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
+ String responseCodeVar, String errorResponseVar) {
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+ }
+
+
+ /**
+ * Sends the empty, synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ sendWorkflowResponse(execution, 200, "")
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Internal Error')
+ }
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info
+ * and existing VNF's name for add-on modules
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void postProcessCreateAAIVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def createResponse = execution.getVariable('DCVFM_createVfModuleResponse')
+ msoLogger.debug("createVfModule Response: " + createResponse)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ String vnfName = utils.getNodeText(createResponse, 'vnf-name')
+ if (vnfName != null) {
+ execution.setVariable('DCVFM_vnfName', vnfName)
+ msoLogger.debug("vnfName retrieved from AAI is: " + vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ }
+ String vnfId = utils.getNodeText(createResponse, 'vnf-id')
+ execution.setVariable('DCVFM_vnfId', vnfId)
+ msoLogger.debug("vnfId is: " + vnfId)
+ String vfModuleId = utils.getNodeText(createResponse, 'vf-module-id')
+ execution.setVariable('DCVFM_vfModuleId', vfModuleId)
+ msoLogger.debug("vfModuleId is: " + vfModuleId)
+ String vfModuleIndex= utils.getNodeText(createResponse, 'vf-module-index')
+ execution.setVariable('DCVFM_vfModuleIndex', vfModuleIndex)
+ msoLogger.debug("vfModuleIndex is: " + vfModuleIndex)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId)
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true")
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true")
+ execution.setVariable("rollbackData", rollbackData)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while postProcessing CreateAAIVfModule request:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Bad response from CreateAAIVfModule' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ }
+
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+ APIResponse response = client.httpGet()
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find base module info')
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+ if (isBaseVfModule == "true") {
+ String baseModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
+ execution.setVariable("DCVFM_baseVfModuleId", baseModuleId)
+ msoLogger.debug('Received baseVfModuleId: ' + baseModuleId)
+ String baseModuleHeatStackId = utils.getNodeText(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DCVFM_baseVfModuleHeatStackId", baseModuleHeatStackId)
+ msoLogger.debug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId)
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Using the vnfId and vfModuleName provided in the inputs,
+ * query AAI to get the corresponding VF Module info.
+ * A 200 response is expected with the VF Module info in the response body,
+ * or a 404 response if the module does not exist yet. Will determine VF Module's
+ * orchestration status if one exists
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModuleForStatus(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.queryAAIVfModuleForStatus(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ execution.setVariable('DCVFM_orchestrationStatus', '')
+
+ try {
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def vfModuleName = execution.getVariable('DCVFM_vfModuleName')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") +
+ "/vf-modules/vf-module?vf-module-name=" + UriUtils.encode(vfModuleName, "UTF-8")
+ msoLogger.debug("AAI endPoint: " + endPoint)
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+ APIResponse response = client.httpGet()
+ msoLogger.debug("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ execution.setVariable('DCVFM_queryAAIVfModuleForStatusResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleForStatusResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ // Retrieve VF Module info and its orchestration status; if not found, do nothing
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find orchestration status')
+ if (responseData != null) {
+ def vfModuleText = utils.getNodeXml(responseData, "vf-module")
+ //def xmlVfModule= new XmlSlurper().parseText(vfModuleText)
+ def orchestrationStatus = utils.getNodeText(vfModuleText, "orchestration-status")
+ execution.setVariable("DCVFM_orchestrationStatus", orchestrationStatus)
+ // Also retrieve vfModuleId
+ def vfModuleId = utils.getNodeText(vfModuleText, "vf-module-id")
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ msoLogger.debug("Received orchestration status from A&AI: " + orchestrationStatus)
+
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModuleForStatus(): ' + e.getMessage())
+ }
+ }
+
+
+ public void preProcessSDNCAssignRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCAssignRequest")
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+ msoLogger.debug("NEW VNF ID: " + vnfId)
+
+ try{
+
+ //Build SDNC Request
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ String assignSDNCRequest = buildSDNCRequest(execution, svcInstId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DCVFM_assignSDNCRequest", assignSDNCRequest)
+ msoLogger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCAssignRequest")
+ }
+
+ public void preProcessSDNCGetRequest(DelegateExecution execution, String element){
+
+ String sdncVersion = execution.getVariable("DCVFM_sdncVersion")
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCGetRequest Process")
+ try{
+ def serviceInstanceId = execution.getVariable('DCVFM_serviceInstanceId')
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+ msoLogger.debug("callbackUrl:" + callbackUrl)
+
+ def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ def msoAction = ""
+ if (!sdncVersion.equals("1707")) {
+ msoAction = "mobility"
+ }
+ else {
+ msoAction = "vfmodule"
+ }
+ // For VNF, serviceOperation (URI for topology GET) will be retrieved from "selflink" element
+ // in the response from GenericGetVnf
+ // For VF Module, in 1707 serviceOperation will be retrieved from "object-path" element
+ // in SDNC Assign Response
+ // For VF Module for older versions, serviceOperation is constructed using vfModuleId
+
+ String serviceOperation = ""
+ if (element.equals("vnf")) {
+ def vnfQueryResponse = execution.getVariable("DCVFM_vnfQueryResponse")
+ serviceOperation = utils.getNodeText(vnfQueryResponse, "selflink")
+ msoLogger.debug("VNF - service operation: " + serviceOperation)
+ }
+ else if (element.equals("vfmodule")) {
+ String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+ msoLogger.debug("DCVFM_assignSDNCAdapterResponse is: \n" + response)
+
+ if (!sdncVersion.equals("1707")) {
+ serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
+ msoLogger.debug("VF Module with sdncVersion before 1707 - service operation: " + serviceOperation)
+ }
+ else {
+ String data = utils.getNodeXml(response, "response-data")
+ msoLogger.debug("responseData: " + data)
+ serviceOperation = utils.getNodeText(data, "object-path")
+ msoLogger.debug("VF Module with sdncVersion of 1707 - service operation: " + serviceOperation)
+ }
+ }
+
+ //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+ sleep(5000)
+
+ String SDNCGetRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${MsoUtils.xmlEscape(msoAction)}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+ msoLogger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCGetRequest Process")
+ }
+
+
+ public void preProcessVNFAdapterRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.VNFAdapterCreateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ //def xml = execution.getVariable("DoCreateVfModuleRequest")
+ //msoLogger.debug('VNF REQUEST is: ' + xml)
+
+ //Get variables
+ //cloudSiteId
+ def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+ //tenantId
+ def tenantId = execution.getVariable("DCVFM_tenantId")
+ //vnfType
+ def vnfType = execution.getVariable("DCVFM_vnfType")
+ //vnfName
+ def vnfName = execution.getVariable("DCVFM_vnfName")
+ //vnfId
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ //vfModuleName
+ def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+ //vfModuleModelName
+ def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+ //vfModuleId
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ //vfModuleIndex
+ def vfModuleIndex = execution.getVariable("DCVFM_vfModuleIndex")
+ //requestId
+ def requestId = execution.getVariable("DCVFM_requestId")
+ //serviceId
+ def serviceId = execution.getVariable("DCVFM_serviceId")
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+ //flavorList
+ ArrayList<CloudFlavor> flavorList = execution.getVariable("DCVFM_flavorList")
+ //backoutOnFailure
+ def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+ // baseVfModuleId
+ def baseVfModuleId = execution.getVariable("DCVFM_baseVfModuleId")
+ // baseVfModuleStackId
+ def baseVfModuleStackId = execution.getVariable("DCVFM_baseVfModuleHeatStackId")
+ // asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("DCVFM_asdcServiceModelVersion")
+ //volumeGroupStackId
+ def volumeGroupStackId = execution.getVariable("DCVFM_volumeGroupStackId")
+ //modelCustomizationUuid
+ def modelCustomizationUuid = execution.getVariable("DCVFM_modelCustomizationUuid")
+ //environmentContext
+ String environmentContext = execution.getVariable("DCVFM_environmentContext")
+ //workloadContext
+ String workloadContext = execution.getVariable("DCVFM_workloadContext")
+ msoLogger.debug("workloadContext: " + workloadContext)
+ msoLogger.debug("environmentContext: " + environmentContext)
+
+ def messageId = execution.getVariable('mso-request-id') + '-' +
+ System.currentTimeMillis()
+
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+
+ msoLogger.debug("notificationUrl: " + notificationUrl)
+ msoLogger.debug("QualifiedHostName: " + useQualifiedHostName)
+
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ Map<String, String> vnfParamsMap = execution.getVariable("DCVFM_vnfParamsMap")
+ // Add flavorLabel List to vnfParamsMap
+ flavorList.each { cloudFlavor ->
+ vnfParamsMap.put("label_" + cloudFlavor.getFlavorLabel(), cloudFlavor.getFlavor())
+ }
+ String vfModuleParams = ""
+ //Get SDNC Response Data for VF Module Topology
+ String vfModuleSdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse')
+ msoLogger.debug("sdncGetResponse: " + vfModuleSdncGetResponse)
+ def sdncVersion = execution.getVariable("sdncVersion")
+
+ if (!sdncVersion.equals("1707")) {
+
+ vfModuleParams = buildVfModuleParams(vnfParamsMap, vfModuleSdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, vfModuleIndex, environmentContext, workloadContext)
+ }
+ else {
+ //Get SDNC Response Data for Vnf Topology
+ String vnfSdncGetResponse = execution.getVariable('DCVFM_getVnfSDNCAdapterResponse')
+ msoLogger.debug("vnfSdncGetResponse: " + vnfSdncGetResponse)
+
+ vfModuleParams = buildVfModuleParamsFromCombinedTopologies(vnfParamsMap, vnfSdncGetResponse, vfModuleSdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, vfModuleIndex, environmentContext, workloadContext)
+ }
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = serviceId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ def createVnfARequest = """
+ <createVfModuleRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
+ <vfModuleName>${MsoUtils.xmlEscape(vfModuleName)}</vfModuleName>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vnfType>${MsoUtils.xmlEscape(vnfType)}</vnfType>
+ <vfModuleType>${MsoUtils.xmlEscape(vfModuleModelName)}</vfModuleType>
+ <vnfVersion>${MsoUtils.xmlEscape(asdcServiceModelVersion)}</vnfVersion>
+ <modelCustomizationUuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</modelCustomizationUuid>
+ <requestType></requestType>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupStackId)}</volumeGroupStackId>
+ <baseVfModuleId>${MsoUtils.xmlEscape(baseVfModuleId)}</baseVfModuleId>
+ <baseVfModuleStackId>${MsoUtils.xmlEscape(baseVfModuleStackId)}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${MsoUtils.xmlEscape(backoutOnFailure)}</backout>
+ <failIfExists>true</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(svcInstId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </createVfModuleRequest>"""
+
+ msoLogger.debug("Create VfModule Request to VNF Adapter: " + createVnfARequest)
+ execution.setVariable("DCVFM_createVnfARequest", createVnfARequest)
+ }
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ if (prefix == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
+ }
+
+ try {
+ def request = execution.getVariable(prefix + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable(processKey + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable('bpmnRequest')
+ }
+
+ setVariable(execution, processKey + 'Request', null);
+ setVariable(execution, 'bpmnRequest', null);
+ setVariable(execution, prefix + 'Request', request);
+ }
+
+ if (request == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
+ }
+ msoLogger.debug("DoCreateVfModule Request: " + request)
+
+ /*
+
+ def requestId = execution.getVariable("mso-request-id")
+
+ if (requestId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
+ }
+
+ utils.logContext(requestId, serviceInstanceId)
+ */
+ msoLogger.debug('Incoming message: ' + System.lineSeparator() + request)
+ msoLogger.trace('Exited ' + method)
+ return request
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+ public boolean isVolumeGroupIdPresent(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.isVolumeGroupIdPresent(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def request = execution.getVariable('DoCreateVfModuleRequest')
+ String volumeGroupId = utils.getNodeText(request, "volume-group-id")
+ if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+ msoLogger.debug('No volume group id is present')
+ return false
+ }
+ else {
+ msoLogger.debug('Volume group id is present')
+ return true
+ }
+
+ }
+
+ public boolean isVolumeGroupNamePresent(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.isVolumeGroupNamePresent(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def request = execution.getVariable('DoCreateVfModuleRequest')
+ String volumeGroupName = utils.getNodeText(request, "volume-group-name")
+ if (volumeGroupName == null || volumeGroupName.isEmpty()) {
+ msoLogger.debug('No volume group name is present')
+ return false
+ }
+ else {
+ msoLogger.debug('Volume group name is present')
+ return true
+ }
+
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("DCVFM_sdncCallbackUrl")
+ def requestId = execution.getVariable("DCVFM_requestId")
+ def serviceId = execution.getVariable("DCVFM_serviceId")
+ def vnfType = execution.getVariable("DCVFM_vnfType")
+ def vnfName = execution.getVariable("DCVFM_vnfName")
+ def tenantId = execution.getVariable("DCVFM_tenantId")
+ def source = execution.getVariable("DCVFM_source")
+ def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+ def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+ def sdncVersion = execution.getVariable("DCVFM_sdncVersion")
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+ def vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+ String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
+ String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
+ String vfModuleEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vfModuleModelInfo)
+ def globalSubscriberId = execution.getVariable("DCVFM_globalSubscriberId")
+ boolean usePreload = execution.getVariable("DCVFM_usePreload")
+ String usePreloadToSDNC = usePreload ? "Y" : "N"
+ def modelCustomizationUuid = execution.getVariable("DCVFM_modelCustomizationUuid")
+ def modelCustomizationUuidString = ""
+ if (!usePreload) {
+ modelCustomizationUuidString = "<model-customization-uuid>" + modelCustomizationUuid + "</model-customization-uuid>"
+ }
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){
+ if (!sdncVersion.equals("1707")) {
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }
+ else {
+ sdncVNFParamsXml = buildCompleteSDNCParamsXml(execution)
+ }
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest = ""
+
+ if (!sdncVersion.equals("1707")) {
+
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(svcInstId)}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vfModuleId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vnf-type>
+ <vnf-name>${MsoUtils.xmlEscape(vfModuleName)}</vnf-name>
+ <generic-vnf-id>${MsoUtils.xmlEscape(vnfId)}</generic-vnf-id>
+ <generic-vnf-name>${MsoUtils.xmlEscape(vnfName)}</generic-vnf-name>
+ <generic-vnf-type>${MsoUtils.xmlEscape(vnfType)}</generic-vnf-type>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ ${modelCustomizationUuidString}
+ <use-preload>${MsoUtils.xmlEscape(usePreloadToSDNC)}</use-preload>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ }
+ else {
+
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>CreateVfModuleInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceId)}</subscription-service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${MsoUtils.xmlEscape(svcInstId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vnfType)}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <vf-module-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vf-module-type>
+ ${vfModuleEcompModelInformation}
+ </vf-module-information>
+ <vf-module-request-input>
+ <vf-module-name>${MsoUtils.xmlEscape(vfModuleName)}</vf-module-name>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vf-module-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+
+ /*
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(requestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>CreateVfModuleInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${MsoUtils.xmlEscape(svcInstId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vnfType)}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <vf-module-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vf-module-type>
+ ${vfModuleEcompModelInformation}
+ </vf-module-information>
+ <vf-module-request-input>
+ <vf-module-name>${MsoUtils.xmlEscape(vfModuleName)}</vf-module-name>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vf-module-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+ */
+
+ }
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+
+ }
+
+ public void preProcessSDNCActivateRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCActivateRequest Process")
+ try{
+ String vnfId = execution.getVariable("DCVFM_vnfId")
+ String vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ String serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+ String activateSDNCRequest = buildSDNCRequest(execution, svcInstId, "activate")
+
+ execution.setVariable("DCVFM_activateSDNCRequest", activateSDNCRequest)
+ msoLogger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCActivateRequest Process")
+ }
+
+ public void postProcessVNFAdapterRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.debug("STARTED postProcessVNFAdapterRequest Process")
+
+ String vnfResponse = execution.getVariable("DCVFM_createVnfAResponse")
+ msoLogger.debug("VNF Adapter Response is: " + vnfResponse)
+
+ RollbackData rollbackData = execution.getVariable("rollbackData")
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("createVfModuleResponse")){
+ msoLogger.debug("Received a Good Response from VNF Adapter for CREATE_VF_MODULE Call.")
+ execution.setVariable("DCVFM_vnfVfModuleCreateCompleted", true)
+ String heatStackId = utils.getNodeText(vnfResponse, "vfModuleStackId")
+ execution.setVariable("DCVFM_heatStackId", heatStackId)
+ msoLogger.debug("Received heat stack id from VNF Adapter: " + heatStackId)
+ rollbackData.put("VFMODULE", "heatstackid", heatStackId)
+ // Parse vnfOutputs for network_fqdn
+ if (vnfResponse.contains("vfModuleOutputs")) {
+ def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+ InputSource source = new InputSource(new StringReader(vfModuleOutputsXml));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document outputsXml = docBuilder.parse(source)
+
+ NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry")
+ List contrailNetworkPolicyFqdnList = []
+ for (int i = 0; i< entries.getLength(); i++) {
+ Node node = entries.item(i)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node
+ String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if (key.equals("contrail-service-instance-fqdn")) {
+ String contrailServiceInstanceFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn)
+ execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
+ }
+ else if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address)
+ execution.setVariable("DCVFM_oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address)
+ execution.setVariable("DCVFM_oamManagementV6Address", oamManagementV6Address)
+ }
+
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ msoLogger.debug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ msoLogger.debug("Response from VNF Adapter is Null for CREATE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true")
+ execution.setVariable("rollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Internal Error Occured in PostProcess Method")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+ }
+ msoLogger.trace("COMPLETED postProcessVnfAdapterResponse Process")
+ }
+
+
+ public void preProcessUpdateAAIVfModuleRequestOrch(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestOrch(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessUpdateAAIVfModuleRequestOrch")
+
+ try{
+
+ //Build UpdateAAIVfModule Request
+ boolean setContrailServiceInstanceFqdn = false
+ def contrailServiceInstanceFqdn = execution.getVariable("DCVFM_contrailServiceInstanceFqdn")
+ if (!contrailServiceInstanceFqdn.equals("")) {
+ setContrailServiceInstanceFqdn = true
+ }
+
+ execution.setVariable("DCVFM_orchestrationStatus", "Created")
+
+ String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, false, true, true, setContrailServiceInstanceFqdn)
+
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+ msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestOrch Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestOrch")
+
+ }
+
+ public void preProcessUpdateAAIVfModuleRequestStatus(DelegateExecution execution, String status) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleStatus(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessUpdateAAIVfModuleStatus")
+
+ try{
+
+ //Build UpdateAAIVfModule Request
+ execution.setVariable("DCVFM_orchestrationStatus", status)
+
+ String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, false, true, false, false)
+
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+ msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleStatus", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessUpdateAAIVfModuleStatus")
+
+ }
+
+
+ public void preProcessUpdateAAIVfModuleRequestGroup(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestGroup(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessUpdateAAIVfModuleRequestGroup")
+
+ try{
+
+ //Build UpdateAAIVfModule Request
+
+ String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, true, false, false, false)
+
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+ msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestGroup Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestGroup")
+
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ RollbackData rollbackData = execution.getVariable("rollbackData")
+
+ if(method.equals("assign")){
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "true")
+ execution.setVariable("CRTGVNF_sdncAssignCompleted", true)
+ }
+ else if (method.equals("activate")) {
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true")
+ }
+ execution.setVariable("rollbackData", rollbackData)
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+ }
+
+ public void preProcessUpdateAfterCreateRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessRequest Process")
+ try{
+ String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+ msoLogger.debug("DCVFM_assignSDNCAdapterResponse: " + response)
+
+ String data = utils.getNodeXml(response, "response-data")
+ String vnfId = utils.getNodeText(data, "vnf-id")
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vnfId
+ def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+ msoLogger.debug("callbackUrl: " + callbackUrl)
+
+ String SDNCGetRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+ msoLogger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCGetRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCGetRequest Process")
+ }
+
+ public String buildUpdateAAIVfModuleRequest(DelegateExecution execution, boolean updateVolumeGroupId,
+ boolean updateOrchestrationStatus, boolean updateHeatStackId, boolean updateContrailFqdn){
+
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def volumeGroupIdString = ""
+ if (updateVolumeGroupId) {
+ volumeGroupIdString = "<volume-group-id>" + execution.getVariable("DCVFM_volumeGroupId") +
+ "</volume-group-id>"
+ }
+ def orchestrationStatusString = ""
+ if (updateOrchestrationStatus) {
+ orchestrationStatusString = "<orchestration-status>" + execution.getVariable("DCVFM_orchestrationStatus") + "</orchestration-status>"
+ }
+ def heatStackIdString = ""
+ if (updateHeatStackId) {
+ heatStackIdString = "<heat-stack-id>" + execution.getVariable("DCVFM_heatStackId") + "</heat-stack-id>"
+ }
+ def contrailFqdnString = ""
+ if (updateContrailFqdn) {
+ contrailFqdnString = "<contrail-service-instance-fqdn>" + execution.getVariable("DCVFM_contrailServiceInstanceFqdn") +
+ "</contrail-service-instance-fqdn>"
+ }
+
+ String updateAAIVfModuleRequest =
+ """<UpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ ${heatStackIdString}
+ ${orchestrationStatusString}
+ ${volumeGroupIdString}
+ ${contrailFqdnString}
+ </UpdateAAIVfModuleRequest>"""
+
+ msoLogger.trace("updateAAIVfModule Request: " + updateAAIVfModuleRequest)
+ return updateAAIVfModuleRequest
+
+ }
+
+ public String buildSDNCParamsXml(DelegateExecution execution){
+
+ String params = ""
+ StringBuilder sb = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String key = entry.getKey();
+ if(key.endsWith("_network")){
+ String requestKey = key.substring(0, key.indexOf("_network"))
+ String requestValue = entry.getValue()
+ paramsXml =
+"""<vnf-networks>
+ <network-role>{ functx:substring-before-match(data($param/@name), '_network') }</network-role>
+ <network-name>{ $param/text() }</network-name>
+</vnf-networks>"""
+ }else{
+ paramsXml = ""
+ }
+ params = sb.append(paramsXml)
+ }
+ return params
+ }
+
+ public String buildCompleteSDNCParamsXml(DelegateExecution execution){
+
+ String params = ""
+ StringBuilder sb = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String key = entry.getKey();
+ String value = entry.getValue()
+ paramsXml = """<${key}>$value</$key>"""
+ params = sb.append(paramsXml)
+ }
+ return params
+ }
+
+ public void queryCloudRegion (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED queryCloudRegion")
+
+ try {
+ String cloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+
+ execution.setVariable("DCVFM_queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug("DCVFM_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable("DCVFM_queryCloudRegionReturnCode") == "404"){
+ execution.setVariable("DCVFM_cloudRegionForVolume", "AAIAIC25")
+ }else{
+ execution.setVariable("DCVFM_cloudRegionForVolume", cloudRegion)
+ }
+ execution.setVariable("DCVFM_isCloudRegionGood", true)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. AAI Response Code: " + execution.getVariable("DCVFM_queryCloudRegionReturnCode")
+ msoLogger.debug(errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ execution.setVariable("DCVFM_isCloudRegionGood", false)
+ }
+ msoLogger.debug(" is Cloud Region Good: " + execution.getVariable("DCVFM_isCloudRegionGood"))
+
+ } catch(BpmnError b){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + b.getMessage());
+ throw b
+ }catch (Exception ex) {
+ // try error
+ String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + ex.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "AAI Query Cloud Region Failed "+errorMessage, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during queryCloudRegion method")
+ }
+ }
+
+ /**
+ *
+ *This method occurs when an MSOWorkflowException is caught. It logs the
+ *variables and ensures that the "WorkflowException" Variable is set.
+ *
+ */
+ public void processBPMNException(DelegateExecution execution){
+
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.debug("Caught a BPMN Exception")
+ msoLogger.debug("Started processBPMNException Method")
+ msoLogger.debug("Variables List: " + execution.getVariables())
+ if(execution.getVariable("WorkflowException") == null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during DoCreateVfModule Sub Process")
+ }
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processBPMNException Method: " + e)
+ }
+ msoLogger.debug("Completed processBPMNException Method")
+ }
+
+ public void prepareCreateAAIVfModuleVolumeGroupRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepareCreateAAIVfModuleVolumeGroupRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED prepareCreateAAIVfModuleVolumeGroupRequest")
+
+ try{
+
+ //Build CreateAAIVfModuleVolumeGroup Request
+
+ def vnfId = execution.getVariable("DCVFM_vnfId")
+ def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+ def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+ //def aicCloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+ def aicCloudRegion = execution.getVariable("DCVFM_cloudRegionForVolume")
+ String createAAIVfModuleVolumeGroupRequest =
+ """<CreateAAIVfModuleVolumeGroupRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <volume-group-id>${MsoUtils.xmlEscape(volumeGroupId)}</volume-group-id>
+ <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudRegion)}</aic-cloud-region>
+ </CreateAAIVfModuleVolumeGroupRequest>"""
+
+ createAAIVfModuleVolumeGroupRequest = utils.formatXml(createAAIVfModuleVolumeGroupRequest)
+ execution.setVariable("DCVFM_createAAIVfModuleVolumeGroupRequest", createAAIVfModuleVolumeGroupRequest)
+ msoLogger.debug("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest', "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareCreateAAIVfModuleVolumeGroupRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED prepareCreateAAIVfModuleVolumeGroupRequest")
+
+ }
+
+ public void createNetworkPoliciesInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.createNetworkPoliciesInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED createNetworkPoliciesInAAI")
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList")
+ int fqdnCount = fqdnList.size()
+ def rollbackData = execution.getVariable("rollbackData")
+
+ execution.setVariable("DCVFM_networkPolicyFqdnCount", fqdnCount)
+ msoLogger.debug("DCVFM_networkPolicyFqdnCount - " + fqdnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTConfig config = new RESTConfig(queryNetworkPolicyByFqdnAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQqueryNetworkPolicyByFqdnReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ msoLogger.debug("The return code is: " + returnCode)
+ // This network policy FQDN already exists in AAI
+ execution.setVariable("DCVFM_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ } else {
+ if (returnCode == 404) {
+ // This network policy FQDN is not in AAI yet. Add it now
+ msoLogger.debug("The return code is: " + returnCode)
+ msoLogger.debug("This network policy FQDN is not in AAI yet: " + fqdn)
+ // Add the network policy with this FQDN to AAI
+ def networkPolicyId = UUID.randomUUID().toString()
+ msoLogger.debug("Adding network-policy with network-policy-id " + networkPolicyId)
+
+ String aaiNamespace = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ msoLogger.debug('AAI namespace is: ' + aaiNamespace)
+ String payload = """<network-policy xmlns="${aaiNamespace}">
+ <network-policy-id>${MsoUtils.xmlEscape(networkPolicyId)}</network-policy-id>
+ <network-policy-fqdn>${MsoUtils.xmlEscape(fqdn)}</network-policy-fqdn>
+ <heat-stack-id>${MsoUtils.xmlEscape(execution.getVariable("DCVFM_heatStackId"))}</heat-stack-id>
+ </network-policy>""" as String
+
+ execution.setVariable("DCVFM_addNetworkPolicyAAIRequestBody", payload)
+
+ String addNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + addNetworkPolicyAAIRequest)
+
+ def aaiRequestIdPut = UUID.randomUUID().toString()
+ RESTConfig configPut = new RESTConfig(addNetworkPolicyAAIRequest);
+ RESTClient clientPut = new RESTClient(configPut).addHeader("X-TransactionId", aaiRequestIdPut)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ msoLogger.debug("invoking PUT call to AAI with payload:"+System.lineSeparator()+payload)
+ APIResponse responsePut = clientPut.httpPut(payload)
+ int returnCodePut = responsePut.getStatusCode()
+ execution.setVariable("DCVFM_aaiAddNetworkPolicyReturnCode", returnCodePut)
+ msoLogger.debug(" ***** AAI add network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodePut)
+
+ String aaiResponseAsStringPut = responsePut.getResponseBodyAsString()
+ if (isOneOf(returnCodePut, 200, 201)) {
+ msoLogger.debug("The return code from adding network policy is: " + returnCodePut)
+ // This network policy was created in AAI successfully
+ execution.setVariable("DCVFM_addNetworkPolicyAAIResponse", aaiResponseAsStringPut)
+ msoLogger.debug(" AddAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsStringPut)
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true")
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn" + i, fqdn)
+ execution.setVariable("rollbackData", rollbackData)
+
+ } else {
+ // aai all errors
+ String putErrorMessage = "Unable to add network-policy to AAI createNetworkPoliciesInAAI - " + returnCodePut
+ msoLogger.debug(putErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, putErrorMessage)
+ }
+
+ } 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 createNetworkPoliciesInAAI - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+
+ } else {
+ msoLogger.debug("No contrail network policies to query/create")
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModule flow. createNetworkPoliciesInAAI() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def oamManagementV4Address = execution.getVariable("DCVFM_oamManagementV4Address")
+ def oamManagementV6Address = execution.getVariable("DCVFM_oamManagementV6Address")
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + oamManagementV4Address + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null && !oamManagementV6Address.isEmpty()) {
+ managementV6AddressElement = '<management-v6-address>' + oamManagementV6Address + '</management-v6-address>'
+ }
+
+ rollbackData.put("VFMODULE", "oamManagementV4Address", oamManagementV4Address)
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DCVM_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered in " + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Post process a result from invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void postProcessUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "true")
+
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+ def oamManagementV4Address = execution.getVariable("DCVFM_oamManagementV4Address")
+ def oamManagementV6Address = execution.getVariable("DCVFM_oamManagementV6Address")
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null && !oamManagementV4Address.isEmpty()) {
+ rollbackData.put("VFMODULE", "oamManagementV4Address", oamManagementV4Address)
+ }
+
+ if (oamManagementV6Address != null && !oamManagementV6Address.isEmpty()) {
+ rollbackData.put("VFMODULE", "oamManagementV6Address", oamManagementV6Address)
+ }
+
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in postProcessUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ public void queryCatalogDB (DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("queryCatalogDB ")
+
+ try {
+ boolean twoPhaseDesign = false
+ // check for input
+
+ String vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+ msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+ def vnfModelCustomizationUuid = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationUuid")
+
+ msoLogger.debug("vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+
+ JSONArray vnfs = catalog.getAllVnfsByVnfModelCustomizationUuid(execution, vnfModelCustomizationUuid, "v2")
+
+ msoLogger.debug("Incoming Query Catalog DB for Vnf Response is: " + vnfModelCustomizationUuid)
+ // Only one match here
+ if (vnfs != null) {
+ JSONObject vnfObject = vnfs.get(0)
+ if (vnfObject != null) {
+ String vnfJson = vnfObject.toString()
+ //
+ ObjectMapper om = new ObjectMapper();
+ VnfResource vnf = om.readValue(vnfJson, VnfResource.class);
+
+ // Get multiStageDesign flag
+
+ String multiStageDesignValue = vnf.getMultiStageDesign()
+ msoLogger.debug("multiStageDesign value from Catalog DB is: " + multiStageDesignValue)
+ if (multiStageDesignValue != null) {
+ if (multiStageDesignValue.equalsIgnoreCase("true")) {
+ twoPhaseDesign = true
+ }
+ }
+ }
+ }
+
+ msoLogger.debug("setting twoPhaseDesign flag to: " + twoPhaseDesign)
+
+ execution.setVariable("DCVFM_twoPhaseDesign", twoPhaseDesign)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in queryCatalogDB', "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryCatalogDB(): ' + e.getMessage())
+ }
+ }
+
+
+ public void preProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("preProcessRollback")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("postProcessRollback")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit postProcessRollback")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
new file mode 100644
index 0000000000..a0b7dabb32
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -0,0 +1,666 @@
+/*-
+ * ============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.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.MsoUtils
+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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+
+public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVfModuleRollback.class);
+
+ def Prefix="DCVFMR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request for the Generic Vnf and Vf Module Ids
+ // and formulate the outgoing request for PrepareUpdateAAIVfModuleRequest
+ public void preProcessRequest(DelegateExecution execution) {
+
+
+ initProcessVariables(execution)
+
+ try {
+
+ execution.setVariable("rolledBack", null)
+ execution.setVariable("rollbackError", null)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ String vnfId = rollbackData.get("VFMODULE", "vnfid")
+ execution.setVariable("DCVFMR_vnfId", vnfId)
+ String vfModuleId = rollbackData.get("VFMODULE", "vfmoduleid")
+ execution.setVariable("DCVFMR_vfModuleId", vfModuleId)
+ String source = rollbackData.get("VFMODULE", "source")
+ execution.setVariable("DCVFMR_source", source)
+ String serviceInstanceId = rollbackData.get("VFMODULE", "serviceInstanceId")
+ execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+ String serviceId = rollbackData.get("VFMODULE", "service-id")
+ execution.setVariable("DCVFMR_serviceId", serviceId)
+ String vnfType = rollbackData.get("VFMODULE", "vnftype")
+ execution.setVariable("DCVFMR_vnfType", vnfType)
+ String vnfName = rollbackData.get("VFMODULE", "vnfname")
+ execution.setVariable("DCVFMR_vnfName", vnfName)
+ String tenantId = rollbackData.get("VFMODULE", "tenantid")
+ execution.setVariable("DCVFMR_tenantId", tenantId)
+ String vfModuleName = rollbackData.get("VFMODULE", "vfmodulename")
+ execution.setVariable("DCVFMR_vfModuleName", vfModuleName)
+ String vfModuleModelName = rollbackData.get("VFMODULE", "vfmodulemodelname")
+ execution.setVariable("DCVFMR_vfModuleModelName", vfModuleModelName)
+ String cloudSiteId = rollbackData.get("VFMODULE", "aiccloudregion")
+ execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId)
+ String heatStackId = rollbackData.get("VFMODULE", "heatstackid")
+ execution.setVariable("DCVFMR_heatStackId", heatStackId)
+ String requestId = rollbackData.get("VFMODULE", "msorequestid")
+ execution.setVariable("DCVFMR_requestId", requestId)
+ // Set mso-request-id to request-id for VNF Adapter interface
+ execution.setVariable("mso-request-id", requestId)
+ List createdNetworkPolicyFqdnList = []
+ int i = 0
+ while (i < 100) {
+ String fqdn = rollbackData.get("VFMODULE", "contrailNetworkPolicyFqdn" + i)
+ if (fqdn == null) {
+ break
+ }
+ createdNetworkPolicyFqdnList.add(fqdn)
+ msoLogger.debug("got fqdn # " + i + ": " + fqdn)
+ i = i + 1
+
+ }
+
+ execution.setVariable("DCVFMR_createdNetworkPolicyFqdnList", createdNetworkPolicyFqdnList)
+ String oamManagementV4Address = rollbackData.get("VFMODULE", "oamManagementV4Address")
+ execution.setVariable("DCVFMR_oamManagementV4Address", oamManagementV4Address)
+ String oamManagementV6Address = rollbackData.get("VFMODULE", "oamManagementV6Address")
+ execution.setVariable("DCVFMR_oamManagementV6Address", oamManagementV6Address)
+ //String serviceInstanceId = rollbackData.get("VFMODULE", "msoserviceinstanceid")
+ //execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+ execution.setVariable("DCVFMR_rollbackPrepareUpdateVfModule", rollbackData.get("VFMODULE", "rollbackPrepareUpdateVfModule"))
+ execution.setVariable("DCVFMR_rollbackUpdateAAIVfModule", rollbackData.get("VFMODULE", "rollbackUpdateAAIVfModule"))
+ execution.setVariable("DCVFMR_rollbackVnfAdapterCreate", rollbackData.get("VFMODULE", "rollbackVnfAdapterCreate"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestAssign", rollbackData.get("VFMODULE", "rollbackSDNCRequestAssign"))
+ execution.setVariable("DCVFMR_rollbackSDNCRequestActivate", rollbackData.get("VFMODULE", "rollbackSDNCRequestActivate"))
+ execution.setVariable("DCVFMR_rollbackCreateAAIVfModule", rollbackData.get("VFMODULE", "rollbackCreateAAIVfModule"))
+ execution.setVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI", rollbackData.get("VFMODULE", "rollbackCreateNetworkPoliciesAAI"))
+ execution.setVariable("DCVFMR_rollbackUpdateVnfAAI", rollbackData.get("VFMODULE", "rollbackUpdateVnfAAI"))
+
+ // formulate the request for PrepareUpdateAAIVfModule
+ String request = """<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <orchestration-status>pending-delete</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>""" as String
+ msoLogger.debug("PrepareUpdateAAIVfModuleRequest :" + request)
+ execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+ } else {
+ execution.setVariable("skipRollback", true)
+ }
+
+ if (execution.getVariable("disableRollback").equals("true" )) {
+ execution.setVariable("skipRollback", true)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ def msg = "Exception in DoCreateVfModuleRollback preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ // build a SDNC vnf-topology-operation request for the specified action
+ // (note: the action passed is expected to be 'changedelete' or 'delete')
+ public void prepSDNCAdapterRequest(DelegateExecution execution) {
+
+ String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DCVFMR_requestId") + "-" + System.currentTimeMillis()
+ }
+
+ def callbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+
+ String source = execution.getVariable("DCVFMR_source")
+ String serviceId = execution.getVariable("DCVFMR_serviceId")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vnfType = execution.getVariable("DCVFMR_vnfType")
+ String vnfName = execution.getVariable("DCVFMR_vnfName")
+ String tenantId = execution.getVariable("DCVFMR_tenantId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ String vfModuleName = execution.getVariable("DCVFMR_vfModuleName")
+ String vfModuleModelName = execution.getVariable("DCVFMR_vfModuleModelName")
+ String cloudSiteId = execution.getVariable("DCVFMR_cloudSiteId")
+ String requestId = execution.getVariable("DCVFMR_requestId")
+
+ String serviceInstanceIdToSdnc = ""
+ if (srvInstId != null && !srvInstId.isEmpty()) {
+ serviceInstanceIdToSdnc = srvInstId
+ } else {
+ serviceInstanceIdToSdnc = vfModuleId
+ }
+
+ def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate")
+ def doSDNCAssignRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestAssign")
+
+ def action = ""
+ def requestAction = ""
+
+ if (doSDNCActivateRollback.equals("true")) {
+ action = "delete"
+ requestAction = "DisconnectVNFRequest"
+ }
+ else if (doSDNCAssignRollback.equals("true")) {
+ action = "rollback"
+ requestAction = "VNFActivateRequest"
+ }
+ else
+ return
+
+
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(vfModuleId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceIdToSdnc)}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vfModuleId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vnf-type>
+ <vnf-name>${MsoUtils.xmlEscape(vfModuleName)}</vnf-name>
+ <generic-vnf-id>${MsoUtils.xmlEscape(vnfId)}</generic-vnf-id>
+ <generic-vnf-name>${MsoUtils.xmlEscape(vnfName)}</generic-vnf-name>
+ <generic-vnf-type>${MsoUtils.xmlEscape(vnfType)}</generic-vnf-type>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncAdapterWorkflowRequest: " + request)
+ execution.setVariable("sdncAdapterWorkflowRequest", request)
+ }
+
+ public void preProcessSDNCDeactivateRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCDeactivateRequest")
+
+ def serviceInstanceId = execution.getVariable("DCVFMR_serviceInstanceId")
+
+ try{
+ //Build SDNC Request
+
+ String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate")
+
+ deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest)
+ execution.setVariable("DCVFMR_deactivateSDNCRequest", deactivateSDNCRequest)
+ msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCDeactivateRequest.", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCDeactivateRequest")
+ }
+
+ public void preProcessSDNCUnassignRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCUnassignRequest Process")
+ try{
+ String serviceInstanceId = execution.getVariable("DCVFMR_serviceInstanceId")
+
+ String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign")
+
+ execution.setVariable("DCVFMR_unassignSDNCRequest", unassignSDNCRequest)
+ msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCUnassignRequest Process")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DCVFMR_requestId") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ def requestId = execution.getVariable("DCVFMR_requestId")
+ def serviceId = execution.getVariable("DCVFMR_serviceId")
+ def serviceInstanceId = execution.getVariable("DCVFMR_serviceInstanceId")
+ def vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ def source = execution.getVariable("DCVFMR_source")
+ def vnfId = execution.getVariable("DCVFMR_vnfId")
+
+ def sdncVersion = execution.getVariable("sdncVersion")
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteVfModuleInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ </vf-module-information>
+ <vf-module-request-input/>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing VnfAdapterDeleteV1 request
+ public void prepVNFAdapterRequest(DelegateExecution execution) {
+
+ String requestId = UUID.randomUUID().toString()
+ String origRequestId = execution.getVariable("DCVFMR_requestId")
+ String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+ String aicCloudRegion = execution.getVariable("DCVFMR_cloudSiteId")
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
+ String tenantId = execution.getVariable("DCVFMR_tenantId")
+ def messageId = execution.getVariable('mso-request-id') + '-' +
+ System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String request = """
+ <deleteVfModuleRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vfModuleStackId>${MsoUtils.xmlEscape(vfModuleStackId)}</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(origRequestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(srvInstId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteVfModuleRequest>
+ """ as String
+
+ msoLogger.debug("vnfAdapterRestV1Request: " + request)
+ execution.setVariable("vnfAdapterRestV1Request", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing UpdateAAIVfModuleRequest request
+ public void prepUpdateAAIVfModule(DelegateExecution execution) {
+
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<UpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <heat-stack-id>DELETE</heat-stack-id>
+ <orchestration-status>deleted</orchestration-status>
+ </UpdateAAIVfModuleRequest>""" as String
+ msoLogger.debug("UpdateAAIVfModuleRequest :" + request)
+ execution.setVariable("UpdateAAIVfModuleRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing UpdateAAIVfModuleRequest request
+ public void prepUpdateAAIVfModuleToAssigned(DelegateExecution execution) {
+
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<UpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <heat-stack-id></heat-stack-id>
+ <orchestration-status>Assigned</orchestration-status>
+ </UpdateAAIVfModuleRequest>""" as String
+ msoLogger.debug("UpdateAAIVfModuleRequest :" + request)
+ execution.setVariable("UpdateAAIVfModuleRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing DeleteAAIVfModuleRequest request
+ public void prepDeleteAAIVfModule(DelegateExecution execution) {
+
+ String vnfId = execution.getVariable("DCVFMR_vnfId")
+ String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<DeleteAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ </DeleteAAIVfModuleRequest>""" as String
+ msoLogger.debug("DeleteAAIVfModuleRequest :" + request)
+ execution.setVariable("DeleteAAIVfModuleRequest", request)
+ }
+
+ // generates a WorkflowException if
+ // -
+ public void handleDoDeleteVfModuleFailure(DelegateExecution execution) {
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "AAI error occurred deleting the Generic Vnf"+ execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError);
+ String processKey = getProcessKey(execution);
+ exceptionUtil.buildWorkflowException(execution, 5000, "Failure in DoDeleteVfModule")
+
+ }
+
+ public void sdncValidateResponse(DelegateExecution execution, String response){
+
+ execution.setVariable("prefix",Prefix)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Successfully Validated SDNC Response")
+ }else{
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ public void deleteNetworkPoliciesFromAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED deleteNetworkPoliciesFromAAI")
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable(Prefix + "createdNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ msoLogger.debug("No network policies to delete")
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable(Prefix + "networkPolicyFqdnCount", fqdnCount)
+ msoLogger.debug("networkPolicyFqdnCount - " + fqdnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+
+ def aaiRequestId = UUID.randomUUID().toString()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ msoLogger.debug("AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ msoLogger.debug("The return code is: " + returnCode)
+ // This network policy FQDN exists in AAI - need to delete it now
+ execution.setVariable(Prefix + "queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ msoLogger.debug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText(aaiResponseAsString, "network-policy-id")
+ msoLogger.debug("Deleting network-policy with network-policy-id " + networkPolicyId)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText(aaiResponseAsString, "resource-version")
+ msoLogger.debug("Deleting network-policy with resource-version " + resourceVersion)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+ msoLogger.debug("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+
+ def aaiRequestIdDel = UUID.randomUUID().toString()
+ msoLogger.debug("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable(Prefix + "aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ msoLogger.debug("AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ msoLogger.debug("The return code from deleting network policy is: " + returnCodeDel)
+ // This network policy was deleted from AAI successfully
+ msoLogger.debug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ")
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ msoLogger.debug(delErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ msoLogger.debug("The return code is: " + returnCode)
+ msoLogger.debug("This network policy FQDN is not in AAI: " + fqdn)
+ } 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 deleteNetworkPoliciesFromAAI - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ msoLogger.debug("No contrail network policies to query/create")
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModuleRollback flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIGenericVnf((' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DCVFMR_vnfId')
+ def oamManagementV4Address = execution.getVariable(Prefix + 'oamManagementV4Address')
+ def oamManagementV6Address = execution.getVariable(Prefix + 'oamManagementV6Address')
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + 'DELETE' + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null) {
+ managementV6AddressElement = '<management-v6-address>' + 'DELETE' + '</management-v6-address>'
+ }
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessUpdateAAIGenericVnf((): ' + e.getMessage())
+ }
+ }
+
+ public void setSuccessfulRollbackStatus (DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED setSuccessfulRollbackStatus")
+
+ try{
+ // Set rolledBack to true, rollbackError to null
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("rollbackError", null)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing setSuccessfulRollbackStatus.", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setSuccessfulRollbackStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED setSuccessfulRollbackStatus")
+ }
+
+ public void setFailedRollbackStatus (DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED setFailedRollbackStatus")
+
+ try{
+ // Set rolledBack to false, rollbackError to actual value, rollbackData to null
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", 'Caught exception in DoCreateVfModuleRollback')
+ execution.setVariable("rollbackData", null)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing setFailedRollbackStatus.", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setFailedRollbackStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED setFailedRollbackStatus")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
new file mode 100644
index 0000000000..5995b6b099
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
@@ -0,0 +1,242 @@
+/*
+ * ============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 groovy.xml.XmlUtil
+
+import groovy.json.*
+
+
+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.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.VidUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.rest.APIResponse
+import org.springframework.web.util.UriUtils
+import org.onap.so.logger.MsoLogger
+import org.onap.so.logger.MessageEnum
+
+
+public class DoCreateVfModuleVolumeRollback extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVfModuleVolumeRollback.class);
+
+ String Prefix="DCVFMODVOLRBK_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateVfModuleVolumeRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "volumeGroupName", null)
+ execution.setVariable(Prefix + "lcpCloudRegionId", null)
+ execution.setVariable(Prefix + "rollbackVnfARequest", null)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoCreateVfModuleVolumeRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ InitializeProcessVariables(execution)
+// rollbackData.put("DCVFMODULEVOL", "aiccloudregion", cloudSiteId)
+ RollbackData rollbackData = execution.getVariable("rollbackData")
+
+// String vnfId = rollbackData.get("DCVFMODULEVOL", "vnfid")
+// execution.setVariable("DCVFMODVOLRBK_vnfId", vnfId)
+// String vfModuleId = rollbackData.get("DCVFMODULEVOL", "vfmoduleid")
+// execution.setVariable("DCVFMODVOLRBK_vfModuleId", vfModuleId)
+// String source = rollbackData.get("DCVFMODULEVOL", "source")
+// execution.setVariable("DCVFMODVOLRBK_source", source)
+// String serviceInstanceId = rollbackData.get("DCVFMODULEVOL", "serviceInstanceId")
+// execution.setVariable("DCVFMODVOLRBK_serviceInstanceId", serviceInstanceId)
+// String serviceId = rollbackData.get("DCVFMODULEVOL", "service-id")
+// execution.setVariable("DCVFMODVOLRBK_serviceId", serviceId)
+// String vnfType = rollbackData.get("DCVFMODULEVOL", "vnftype")
+// execution.setVariable("DCVFMODVOLRBK_vnfType", vnfType)
+// String vnfName = rollbackData.get("DCVFMODULEVOL", "vnfname")
+// execution.setVariable("DCVFMODVOLRBK_vnfName", vnfName)
+// String tenantId = rollbackData.get("DCVFMODULEVOL", "tenantid")
+// execution.setVariable("DCVFMODVOLRBK_tenantId", tenantId)
+// String vfModuleName = rollbackData.get("DCVFMODULEVOL", "vfmodulename")
+// execution.setVariable("DCVFMODVOLRBK_vfModuleName", vfModuleName)
+// String vfModuleModelName = rollbackData.get("DCVFMODULEVOL", "vfmodulemodelname")
+// execution.setVariable("DCVFMODVOLRBK_vfModuleModelName", vfModuleModelName)
+// String cloudSiteId = rollbackData.get("DCVFMODULEVOL", "aiccloudregion")
+// execution.setVariable("DCVFMODVOLRBK_cloudSiteId", cloudSiteId)
+// String heatStackId = rollbackData.get("DCVFMODULEVOL", "heatstackid")
+// execution.setVariable("DCVFMODVOLRBK_heatStackId", heatStackId)
+// String requestId = rollbackData.get("DCVFMODULEVOL", "msorequestid")
+// execution.setVariable("DCVFMODVOLRBK_requestId", requestId)
+
+ String volumeGroupName = rollbackData.get("DCVFMODULEVOL", "volumeGroupName")
+ execution.setVariable("DCVFMODVOLRBK_volumeGroupName", volumeGroupName)
+
+ String lcpCloudRegionId = rollbackData.get("DCVFMODULEVOL", "aiccloudregion")
+ execution.setVariable("DCVFMODVOLRBK_lcpCloudRegionId", lcpCloudRegionId)
+
+ execution.setVariable("DCVFMODVOLRBK_rollbackVnfARequest", rollbackData.get("DCVFMODULEVOL", "rollbackVnfARequest"))
+ execution.setVariable("DCVFMODVOLRBK_backoutOnFailure", rollbackData.get("DCVFMODULEVOL", "backoutOnFailure"))
+ execution.setVariable("DCVFMODVOLRBK_isCreateVnfRollbackNeeded", rollbackData.get("DCVFMODULEVOL", "isCreateVnfRollbackNeeded"))
+ execution.setVariable("DCVFMODVOLRBK_isAAIRollbackNeeded", rollbackData.get("DCVFMODULEVOL", "isAAIRollbackNeeded"))
+
+ }
+
+ /**
+ * Query AAI volume group by name
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIVolGrpName(DelegateExecution execution, isDebugEnabled) {
+
+ def volumeGroupName = execution.getVariable('DCVFMODVOLRBK_volumeGroupName')
+ def cloudRegion = execution.getVariable('DCVFMODVOLRBK_lcpCloudRegionId')
+
+ // This is for stub testing
+ def testVolumeGroupName = execution.getVariable('test-volume-group-name')
+ if (testVolumeGroupName != null && testVolumeGroupName.length() > 0) {
+ volumeGroupName = testVolumeGroupName
+ }
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeNameRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups" + "?volume-group-name=" + UriUtils.encode(volumeGroupName, 'UTF-8')
+
+ msoLogger.debug('Query AAI volume group by name: ' + queryAAIVolumeNameRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeNameRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query volume group by name return code: " + returnCode)
+ msoLogger.debug("AAI query volume group by name response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ execution.setVariable(prefix+"queryAAIVolGrpNameResponse", aaiResponseAsString)
+ execution.setVariable(prefix+'AaiReturnCode', returnCode)
+
+ if (returnCode=='200') {
+ // @TODO: verify error code
+ // @TODO: create class of literals representing error codes
+ execution.setVariable(prefix+'queryAAIVolGrpNameResponse', aaiResponseAsString)
+ msoLogger.debug("Volume Group Name $volumeGroupName exists in AAI.")
+ } else {
+ if (returnCode=='404') {
+ msoLogger.debug("Volume Group Name $volumeGroupName does not exist in AAI.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupName not found in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+
+ public void callRESTDeleteAAIVolumeGroup(DelegateExecution execution, isDebugEnabled) {
+
+ callRESTQueryAAIVolGrpName(execution, isDebugEnabled)
+
+ def queryAaiVolumeGroupResponse = execution.getVariable(prefix+'queryAAIVolGrpNameResponse')
+
+ def volumeGroupId = utils.getNodeText(queryAaiVolumeGroupResponse, "volume-group-id")
+ def resourceVersion = utils.getNodeText(queryAaiVolumeGroupResponse, "resource-version")
+
+ def cloudRegion = execution.getVariable("DCVFMODVOLRBK_lcpCloudRegionId")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group" + '/' + volumeGroupId + "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+ msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI delete volume group return code: " + returnCode)
+ msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ def volumeGroupNameFound = prefix+'volumeGroupNameFound'
+ if (returnCode=='200' || returnCode=='204' ) {
+ msoLogger.debug("Volume group $volumeGroupId deleted.")
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
new file mode 100644
index 0000000000..f734ffb3ff
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -0,0 +1,616 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.VfModuleBase;
+import org.onap.so.bpmn.core.RollbackData
+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.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+class DoCreateVfModuleVolumeV2 extends VfModuleBase {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVfModuleVolumeV2.class);
+ String prefix='DCVFMODVOLV2_'
+ JsonUtils jsonUtil = new JsonUtils()
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ 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)
+
+
+ def tenantId = execution.getVariable("tenantId")
+ if (tenantId == null) {
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ tenantId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ }
+
+ def cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ if (cloudSiteId == null) {
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", cloudSiteId)
+ }
+
+ // Extract attributes from modelInfo
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ //modelCustomizationUuid
+ 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
+ * @param isDebugLogEnabled
+ */
+ public void displayInput(DelegateExecution execution, isDebugLogEnabled) {
+ def input = ['mso-request-id', 'msoRequestId', 'isDebugLogEnabled', 'disableRollback', 'failIfExists', 'serviceInstanceId',
+ 'vnfId', 'vnfName', 'tenantId', 'volumeGroupId', 'volumeGroupName', 'lcpCloudRegionId', 'vnfType', 'vfModuleModelInfo', 'asdcServiceModelVersion',
+ 'test-volume-group-name', 'test-volume-group-id', 'vfModuleInputParams']
+
+ msoLogger.debug('Begin input: ')
+ input.each {
+ msoLogger.debug(it + ': ' + execution.getVariable(it))
+ }
+ msoLogger.debug('End input.')
+ }
+
+
+ /**
+ * Define and set rollbackdata object
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void setRollbackData(DelegateExecution execution, isDebugEnabled) {
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+ def volumeGroupName = execution.getVariable('volumeGroupName')
+ rollbackData.put("DCVFMODULEVOL", "volumeGroupName", volumeGroupName)
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+
+ /**
+ * validate getServiceInstance response
+ * @param execution
+ * @param isDebugEnabled
+ */
+ 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)
+ }
+
+ }
+
+ /**
+ * Get cloud region
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution, isDebugEnabled) {
+
+ def cloudRegion = execution.getVariable("lcpCloudRegionId")
+ msoLogger.debug('Request cloud region is: ' + cloudRegion)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryCloudRegionRequest = aaiEndpoint + '/' + cloudRegion
+
+ msoLogger.debug(queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ def aaiCloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "AAI", cloudRegion)
+ if ((aaiCloudRegion != "ERROR")) {
+ execution.setVariable("lcpCloudRegionId", aaiCloudRegion)
+ msoLogger.debug("AIC Cloud Region for AAI: " + aaiCloudRegion)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable(prefix+"queryCloudRegionReturnCode")
+ msoLogger.debug(errorMessage)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+ def poCloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ if ((poCloudRegion != "ERROR")) {
+ execution.setVariable("poLcpCloudRegionId", poCloudRegion)
+ msoLogger.debug("AIC Cloud Region for PO: " + poCloudRegion)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable(prefix+"queryCloudRegionReturnCode")
+ msoLogger.debug(errorMessage)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("DCVFMODULEVOL", "aiccloudregion", cloudRegion)
+ }
+
+
+ /**
+ * Query AAI volume group by name
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIVolGrpName(DelegateExecution execution, isDebugEnabled) {
+
+ def volumeGroupName = execution.getVariable('volumeGroupName')
+ def cloudRegion = execution.getVariable('lcpCloudRegionId')
+
+ // This is for stub testing
+ def testVolumeGroupName = execution.getVariable('test-volume-group-name')
+ if (testVolumeGroupName != null && testVolumeGroupName.length() > 0) {
+ volumeGroupName = testVolumeGroupName
+ }
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeNameRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups" + "?volume-group-name=" + UriUtils.encode(volumeGroupName, 'UTF-8')
+
+ msoLogger.debug('Query AAI volume group by name: ' + queryAAIVolumeNameRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeNameRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query volume group by name return code: " + returnCode)
+ msoLogger.debug("AAI query volume group by name response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ execution.setVariable(prefix+"queryAAIVolGrpNameResponse", aaiResponseAsString)
+ execution.setVariable(prefix+'AaiReturnCode', returnCode)
+
+ if (returnCode=='200') {
+ execution.setVariable(prefix+'queryAAIVolGrpNameResponse', aaiResponseAsString)
+ msoLogger.debug("Volume Group Name $volumeGroupName exists in AAI.")
+ } else {
+ if (returnCode=='404') {
+ msoLogger.debug("Volume Group Name $volumeGroupName does not exist in AAI.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupName not found in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void buildWorkflowException(DelegateExecution execution, int errorCode, errorMessage, isDebugEnabled) {
+ msoLogger.debug(errorMessage)
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+ }
+
+
+ /**
+ * Create a WorkflowException
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void handleError(DelegateExecution execution, isDebugEnabled) {
+ WorkflowException we = execution.getVariable('WorkflowException')
+ if (we == null) {
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, "Enexpected error encountered!")
+ }
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+
+ /**
+ * Create volume group in AAI
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTCreateAAIVolGrpName(DelegateExecution execution, isDebugEnabled) {
+
+ def vnfId = execution.getVariable('vnfId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def volumeName = execution.getVariable("volumeGroupName")
+ def modelCustomizationId = execution.getVariable("modelCustomizationId")
+ 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')
+ if (testGroupId != null && testGroupId.trim() != '') {
+ msoLogger.debug("test volumeGroupId is present: " + testGroupId)
+ volumeGroupId = testGroupId
+ execution.setVariable("test-volume-group-name", "MSOTESTVOL101a-vSAMP12_base_vol_module-0")
+ }
+
+ msoLogger.debug("volumeGroupId to be used: " + volumeGroupId)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String createAAIVolumeGrpNameUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ String namespace = aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+ msoLogger.debug("AAI namespace is: " + namespace)
+
+ msoLogger.debug("Request URL for PUT: " + createAAIVolumeGrpNameUrlRequest)
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ String payload = networkUtils.createCloudRegionVolumeRequest(volumeGroupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace, modelCustomizationId)
+ String payloadXml = utils.formatXml(payload)
+ msoLogger.debug("Request payload for PUT: " + payloadXml)
+
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, createAAIVolumeGrpNameUrlRequest, payloadXml)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI create volume group return code: " + returnCode)
+ msoLogger.debug("AAI create volume group response: " + aaiResponseAsString)
+
+ execution.setVariable(prefix+"createAAIVolumeGrpNameReturnCode", returnCode)
+ execution.setVariable(prefix+"createAAIVolumeGrpNameResponse", aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode =='201') {
+ RollbackData rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("DCVFMODULEVOL", "isAAIRollbackNeeded", "true")
+ } else {
+ execution.setVariable(prefix+"isErrorMessageException", true)
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to create volume group in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ msoLogger.debug(" AAI Adapter Query Failed. WorkflowException - " + "\n" + aWorkflowException)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Prepare VNF adapter create request XML
+ * @param execution
+ */
+ public void prepareVnfAdapterCreateRequest(DelegateExecution execution, isDebugEnabled) {
+
+ def aaiGenericVnfResponse = execution.getVariable(prefix+'AAIQueryGenericVfnResponse')
+ 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')
+ def tenantId = execution.getVariable('tenantId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def volumeGroupnName = execution.getVariable('volumeGroupName')
+
+ 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')
+ if (testGroupId != null && testGroupId.trim() != '') {
+ msoLogger.debug("test volumeGroupId is present: " + testGroupId)
+ volumeGroupId = testGroupId
+ 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")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey();
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <entry>
+ <key>${MsoUtils.xmlEscape(paramName)}</key>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </entry>
+ """
+ sbParams.append(paramsXml)
+ }
+
+ volumeGroupParams = sbParams.toString()
+ msoLogger.debug("volumeGroupParams: "+ volumeGroupParams)
+
+ def backoutOnFailure = execution.getVariable(prefix+"backoutOnFailure")
+ msoLogger.debug("backoutOnFailure: "+ backoutOnFailure)
+
+ def failIfExists = execution.getVariable("failIfExists")
+ 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 =
+ """
+ <createVolumeGroupRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupName>${MsoUtils.xmlEscape(volumeGroupnName)}</volumeGroupName>
+ <vnfType>${MsoUtils.xmlEscape(vnfType)}</vnfType>
+ <vnfVersion>${MsoUtils.xmlEscape(vnfVersion)}</vnfVersion>
+ <vfModuleType>${MsoUtils.xmlEscape(vnfModuleType)}</vfModuleType>
+ <modelCustomizationUuid>${MsoUtils.xmlEscape(modelCustomizationId)}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${MsoUtils.xmlEscape(vnfId)}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${MsoUtils.xmlEscape(vnfName)}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${MsoUtils.xmlEscape(volumeGroupId)}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${MsoUtils.xmlEscape(volumeGroupnName)}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <backout>${MsoUtils.xmlEscape(backoutOnFailure)}</backout>
+ <failIfExists>${MsoUtils.xmlEscape(failIfExists)}</failIfExists>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </createVolumeGroupRequest>
+ """
+
+ String vnfSubCreateWorkflowRequestAsString = utils.formatXml(vnfSubCreateWorkflowRequest)
+ msoLogger.debug(vnfSubCreateWorkflowRequestAsString)
+ msoLogger.debug(vnfSubCreateWorkflowRequestAsString)
+ execution.setVariable(prefix+"createVnfARequest", vnfSubCreateWorkflowRequestAsString)
+
+ // build rollback request for use later if needed
+ String vnfSubRollbackWorkflowRequest = buildRollbackVolumeGroupRequestXml(volumeGroupId, cloudSiteId, tenantId, requestId, serviceId, messageId, notificationUrl)
+
+ msoLogger.debug("Sub Vnf flow rollback request: vnfSubRollbackWorkflowRequest " + "\n" + vnfSubRollbackWorkflowRequest)
+
+ String vnfSubRollbackWorkflowRequestAsString = utils.formatXml(vnfSubRollbackWorkflowRequest)
+ execution.setVariable(prefix+"rollbackVnfARequest", vnfSubRollbackWorkflowRequestAsString)
+ }
+
+ public String buildRollbackVolumeGroupRequestXml(volumeGroupId, cloudSiteId, tenantId, requestId, serviceId, messageId, notificationUrl) {
+
+ def request = """
+ <rollbackVolumeGroupRequest>
+ <volumeGroupRollback>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>{{VOLUMEGROUPSTACKID}}</volumeGroupStackId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ </volumeGroupRollback>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </rollbackVolumeGroupRequest>
+ """
+
+ return request
+ }
+
+ public String updateRollbackVolumeGroupRequestXml(String rollabackRequest, String heatStackId) {
+ String newRequest = rollabackRequest.replace("{{VOLUMEGROUPSTACKID}}", heatStackId)
+ return newRequest
+ }
+
+ /**
+ * Validate VNF adapter response
+ * @param execution
+ */
+ public void validateVnfResponse(DelegateExecution execution, isDebugEnabled) {
+ def vnfSuccess = execution.getVariable('VNFREST_SuccessIndicator')
+ msoLogger.debug("vnfAdapterSuccessIndicator: "+ vnfSuccess)
+ if(vnfSuccess==true) {
+ String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
+ String heatStackID = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
+ String vnfRollbackRequest = execution.getVariable(prefix+"rollbackVnfARequest")
+ String updatedVnfRollbackRequest = updateRollbackVolumeGroupRequestXml(vnfRollbackRequest, heatStackID)
+ msoLogger.debug("vnfAdapter rollback request: "+ updatedVnfRollbackRequest)
+ RollbackData rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("DCVFMODULEVOL", "rollbackVnfARequest", updatedVnfRollbackRequest)
+ rollbackData.put("DCVFMODULEVOL", "isCreateVnfRollbackNeeded", "true")
+ }
+ }
+
+
+ /**
+ * Update voulume group in AAI
+ * @TODO: Can we re-use the create method??
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTUpdateCreatedVolGrpName(DelegateExecution execution, isDebugEnabled) {
+
+ String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
+ String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+ String modelCustomizationId = execution.getVariable("modelCustomizationId")
+ String cloudRegion = execution.getVariable("lcpCloudRegionId")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String updateAAIVolumeGroupUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, 'UTF-8')
+
+ String namespace = aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+
+ msoLogger.debug("updateAAIVolumeGroupUrlRequest - " + updateAAIVolumeGroupUrlRequest)
+
+ String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
+ def heatStackID = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
+
+ execution.setVariable(prefix+"heatStackId", heatStackID)
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ String payload = networkUtils.updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, heatStackID, namespace, modelCustomizationId)
+ String payloadXml = utils.formatXml(payload)
+
+ msoLogger.debug("Payload to Update Created VolumeGroupName - " + "\n" + payloadXml)
+
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, updateAAIVolumeGroupUrlRequest, payloadXml)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI create volume group return code: " + returnCode)
+ msoLogger.debug("AAI create volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode =='200') {
+ execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNameResponse", aaiResponseAsString)
+ execution.setVariable(prefix+"isPONR", true)
+ } else {
+ execution.setVariable(prefix+"isErrorMessageException", true)
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to update volume group in AAI. Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ msoLogger.debug(" AAI Adapter Query Failed. WorkflowException - " + "\n" + aWorkflowException)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Query AAI Generic VNF
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIGenericVnf(DelegateExecution execution, isDebugEnabled) {
+
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+ def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+
+ msoLogger.debug("AAI query generic vnf request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query generic vnf return code: " + returnCode)
+ msoLogger.debug("AAI query generic vnf response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ msoLogger.debug('Generic vnf ' + vnfId + ' found in AAI.')
+ execution.setVariable(prefix+'AAIQueryGenericVfnResponse', aaiResponseAsString)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+ msoLogger.debug(message)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
new file mode 100644
index 0000000000..46a502e124
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -0,0 +1,618 @@
+/*-
+ * ============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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+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
+
+
+/**
+ * This class supports the DoCreateVnf building block subflow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoCreateVnf extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVnf.class);
+ String Prefix="DoCVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED DoCreateVnf PreProcessRequest Process")
+
+ // DISABLE SDNC INTERACTION FOR NOW
+ execution.setVariable("SDNCInteractionEnabled", false)
+
+
+ /*******************/
+ try{
+ // Get Variables
+
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("DoCVNF_requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ msoLogger.debug("Incoming Request Id is: " + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DoCVNF_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VNF", "serviceInstanceId", serviceInstanceId)
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DoCVNF_vnfType", vnfType)
+ msoLogger.debug("Incoming Vnf Type is: " + vnfType)
+
+ String vnfName = execution.getVariable("vnfName")
+ if (vnfName.equals("") || vnfName.equals("null")) {
+ vnfName = null
+ }
+ execution.setVariable("DoCVNF_vnfName", vnfName)
+ msoLogger.debug("Incoming Vnf Name is: " + vnfName)
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DoCVNF_serviceId", serviceId)
+ msoLogger.debug("Incoming Service Id is: " + serviceId)
+
+ String source = "VID"
+ execution.setVariable("DoCVNF_source", source)
+ rollbackData.put("VNF", "source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ String suppressRollback = execution.getVariable("disableRollback")
+ execution.setVariable("DoCVNF_suppressRollback", suppressRollback)
+ msoLogger.debug("Incoming Suppress Rollback is: " + suppressRollback)
+
+ String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantUuid")
+ execution.setVariable("DoCVNF_modelInvariantId", modelInvariantId)
+ msoLogger.debug("Incoming Invariant Id is: " + modelInvariantId)
+
+ String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelUuid")
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ execution.setVariable("DoCVNF_modelVersionId", modelVersionId)
+ msoLogger.debug("Incoming Version Id is: " + modelVersionId)
+
+ String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
+ execution.setVariable("DoCVNF_modelVersion", modelVersion)
+ msoLogger.debug("Incoming Model Version is: " + modelVersion)
+
+ String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
+ execution.setVariable("DoCVNF_modelName", modelName)
+ msoLogger.debug("Incoming Model Name is: " + modelName)
+
+ String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationUuid")
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+ execution.setVariable("DoCVNF_modelCustomizationId", modelCustomizationId)
+ msoLogger.debug("Incoming Model Customization Id is: " + modelCustomizationId)
+
+ String cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId)
+ rollbackData.put("VNF", "cloudSiteId", cloudSiteId)
+ msoLogger.debug("Incoming Cloud Site Id is: " + cloudSiteId)
+
+ String tenantId = execution.getVariable("tenantId")
+ execution.setVariable("DoCVNF_tenantId", tenantId)
+ rollbackData.put("VNF", "tenantId", tenantId)
+ msoLogger.debug("Incoming Tenant Id is: " + tenantId)
+
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if (globalSubscriberId == null) {
+ globalSubscriberId = ""
+ }
+ execution.setVariable("DoCVNF_globalSubscriberId", globalSubscriberId)
+ msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1702"
+ }
+ execution.setVariable("DoCVNF_sdncVersion", sdncVersion)
+ msoLogger.debug("Incoming Sdnc Version is: " + sdncVersion)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("DoCVNF_requestInfo", requestInfo)
+ //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+ String orchStatus = "Created"
+ execution.setVariable("DoCVNF_orchStatus", orchStatus)
+
+ //TODO: Equipment Role - Should come from SDN-C Response in 1702
+ String equipmentRole = " "
+ execution.setVariable("DoCVNF_equipmentRole", equipmentRole)
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ msoLogger.debug("Generated Vnf Id is: " + vnfId)
+ }
+ }
+ execution.setVariable("DoCVNF_vnfId", vnfId)
+
+ // Setting for Sub Flow Calls
+ execution.setVariable("DoCVNF_type", "generic-vnf")
+ execution.setVariable("GENGS_type", "service-instance")
+
+ String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
+ rollbackData.put("VNF", "sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
+
+ VnfResource vnfResource = (VnfResource) execution.getVariable((String)"vnfResourceDecomposition")
+ String nfRole = vnfResource.getNfRole()
+
+ execution.setVariable("DoCVNF_nfRole", nfRole)
+ msoLogger.debug("NF Role is: " + nfRole)
+
+ String nfNamingCode = vnfResource.getNfNamingCode()
+ execution.setVariable("DoCVNF_nfNamingCode", nfNamingCode)
+ msoLogger.debug("NF Naming Code is: " + nfNamingCode)
+
+ String nfType = vnfResource.getNfType()
+ execution.setVariable("DoCVNF_nfType", nfType)
+ msoLogger.debug("NF Type is: " + nfType)
+
+ String nfFunction = vnfResource.getNfFunction()
+ execution.setVariable("DoCVNF_nfFunction", nfFunction)
+ msoLogger.debug("NF Function is: " + nfFunction)
+
+ rollbackData.put("VNF", "rollbackSDNCAssign", "false")
+ rollbackData.put("VNF", "rollbackSDNCActivate", "false")
+ rollbackData.put("VNF", "rollbackVnfCreate", "false")
+
+ execution.setVariable("rollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoCreateVnf PreProcessRequest method!" + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoCreateVnf PreProcessRequest Process")
+ }
+
+ private Object getVariableEnforced(DelegateExecution execution, String name){
+ Object enforced = execution.getVariable(name)
+ if(!enforced){
+ return "";
+ }
+ return enforced;
+ }
+
+ public void createGenericVnf (DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoCreateVnf CreateGenericVnf Process")
+ try {
+ //Get Vnf Info
+ String vnfId = getVariableEnforced(execution, "DoCVNF_vnfId")
+ String vnfName = getVariableEnforced(execution, "DoCVNF_vnfName")
+ if (vnfName == null) {
+ vnfName = "sdncGenerated"
+ msoLogger.debug("Sending a dummy VNF name to AAI - the name will be generated by SDNC: " + vnfName)
+ }
+ String vnfType = getVariableEnforced(execution, "DoCVNF_vnfType")
+ String serviceId = getVariableEnforced(execution, "DoCVNF_serviceId")
+ String orchStatus = getVariableEnforced(execution, "DoCVNF_orchStatus")
+ String modelInvariantId = getVariableEnforced(execution, "DoCVNF_modelInvariantId")
+ String modelVersionId = getVariableEnforced(execution, "DoCVNF_modelVersionId")
+ String modelCustomizationId = getVariableEnforced(execution, "DoCVNF_modelCustomizationId")
+ String equipmentRole = getVariableEnforced(execution, "DoCVNF_equipmentRole")
+ String nfType = getVariableEnforced(execution, "DoCVNF_nfType")
+ String nfRole = getVariableEnforced(execution, "DoCVNF_nfRole")
+ String nfFunction = getVariableEnforced(execution, "DoCVNF_nfFunction")
+ String nfNamingCode = getVariableEnforced(execution, "DoCVNF_nfNamingCode")
+
+ //Get Service Instance Info
+ String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId")
+ String siRelatedLink = getVariableEnforced(execution, "GENGS_siResourceLink")
+
+ int custStart = siRelatedLink.indexOf("customer/")
+ int custEnd = siRelatedLink.indexOf("/service-subscriptions")
+ String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+ Map<String, String> payload = new LinkedHashMap<>();
+ payload.put("vnf-id", vnfId);
+ payload.put("vnf-name", vnfName);
+ payload.put("service-id", serviceId);
+ payload.put("vnf-type", vnfType);
+ payload.put("prov-status", "PREPROV");
+ payload.put("orchestration-status", orchStatus);
+ payload.put("model-invariant-id", modelInvariantId);
+ payload.put("model-version-id", modelVersionId);
+ payload.put("model-customization-id", modelCustomizationId);
+ payload.put("nf-type", nfType);
+ payload.put("nf-role", nfRole);
+ payload.put("nf-function", nfFunction);
+ payload.put("nf-naming-code", nfNamingCode);
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient();
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ resourceClient.create(uri, payload)
+
+ AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+ resourceClient.connect(uri, siUri)
+
+ }catch(Exception ex) {
+ msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process")
+ }
+ msoLogger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process")
+ }
+
+ public void postProcessCreateGenericVnf (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED DoCreateVnf PostProcessCreateGenericVnf Process")
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("VNF", "vnfId", vnfId)
+ rollbackData.put("VNF", "rollbackVnfCreate", "true")
+ execution.setVariable("rollbackData", rollbackData)
+ }catch(Exception ex) {
+ msoLogger.debug("Error Occured in DoCreateVnf PostProcessCreateGenericVnf Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PostProcessCreateGenericVnf Process")
+ }
+ msoLogger.trace("COMPLETED DoCreateVnf PostProcessCreateGenericVnf Process")
+ }
+
+
+ public void preProcessSDNCAssignRequest(DelegateExecution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCAssignRequest")
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ msoLogger.debug("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest)
+ msoLogger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCAssignRequest" , "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCAssignRequest")
+ }
+
+ public void preProcessSDNCActivateRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCActivateRequest Process")
+ try{
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest)
+ msoLogger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCActivateRequest Process")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DoCVNF_requestId") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("DoCVNF_sdncCallbackUrl")
+ def requestId = execution.getVariable("DoCVNF_requestId")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ // Only send vnfName to SDNC if it is not null, otherwise it will get generated by SDNC on Assign
+ String vnfNameString = ""
+ if (vnfName != null) {
+ vnfNameString = """<vnf-name>${MsoUtils.xmlEscape(vnfName)}</vnf-name>"""
+ }
+ def tenantId = execution.getVariable("DoCVNF_tenantId")
+ def source = execution.getVariable("DoCVNF_source")
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def cloudSiteId = execution.getVariable("DoCVNF_cloudSiteId")
+ def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
+ String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
+ def globalSubscriberId = execution.getVariable("DoCVNF_globalSubscriberId")
+ def sdncVersion = execution.getVariable("DoCVNF_sdncVersion")
+
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("DoCVNF_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>CreateVnfInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceId)}</subscription-service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${MsoUtils.xmlEscape(svcInstId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vnfType)}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vnf-request-input>
+ ${vnfNameString}
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ msoLogger.debug("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ if(method.equals("get")){
+ String topologyGetResponse = execution.getVariable("DoCVNF_getSDNCAdapterResponse")
+ String data = utils.getNodeXml(topologyGetResponse, "response-data")
+ msoLogger.debug("topologyGetResponseData: " + data)
+ String vnfName = utils.getNodeText(data, "vnf-name")
+ msoLogger.debug("vnfName received from SDNC: " + vnfName)
+ execution.setVariable("vnfName", vnfName)
+ execution.setVariable("DoCVNF_vnfName", vnfName)
+ }
+ def rollbackData = execution.getVariable("rollbackData")
+ if (method.equals("assign")) {
+ rollbackData.put("VNF", "rollbackSDNCAssign", "true")
+ }
+ else if (method.equals("activate")) {
+ rollbackData.put("VNF", "rollbackSDNCActivate", "true")
+ }
+ execution.setVariable("rollbackData", rollbackData)
+
+
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.debug("COMPLETED ValidateSDNCResponse Process")
+ }
+
+ public void preProcessSDNCGetRequest(DelegateExecution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCGetRequest Process")
+ try{
+ def serviceInstanceId = execution.getVariable('DoCVNF_serviceInstanceId')
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def callbackUrl = execution.getVariable("DoCVFM_sdncCallbackUrl")
+ msoLogger.debug("callbackUrl:" + callbackUrl)
+
+ def vnfId = execution.getVariable('DCVFM_vnfId')
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vnfId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+ // serviceOperation will be retrieved from "object-path" element
+ // in SDNC Assign Response for VNF
+ String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
+ msoLogger.debug("DoCVNF_assignSDNCAdapterResponse is: \n" + response)
+
+ String serviceOperation = ""
+
+ String data = utils.getNodeXml(response, "response-data")
+ msoLogger.debug("responseData: " + data)
+ serviceOperation = utils.getNodeText(data, "object-path")
+ msoLogger.debug("VNF with sdncVersion of 1707 or later - service operation: " + serviceOperation)
+
+
+ //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+ sleep(5000)
+
+ String SDNCGetRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>vfmodule</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+
+ execution.setVariable("DoCVNF_getSDNCRequest", SDNCGetRequest)
+ msoLogger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest. ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCGetRequest Process")
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DoCVNF_vnfId')
+ msoLogger.debug("VNF ID: " + vnfId)
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <orchestration-status>Active</orchestration-status>
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DoCVNF_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Caught exception in " + method , "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
new file mode 100644
index 0000000000..d3dbd9107e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
@@ -0,0 +1,467 @@
+/*-
+ * ============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 java.util.UUID;
+
+import java.util.List
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ModuleResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.DecomposeJsonUtil
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources;
+import org.onap.so.logger.MsoLogger
+import org.onap.so.logger.MessageEnum
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+
+
+/**
+* This class supports the macro VID Flow
+* with the creation of a generic vnf and related VF modules.
+*/
+class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVnfAndModules.class);
+ String Prefix="DCVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoCreateVnfAndModules PreProcessRequest Process")
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+ setBasicDBAuthHeader(execution, isDebugLogEnabled)
+ try{
+ // Get Variables
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ msoLogger.debug("Incoming Request Id is: " + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ msoLogger.debug("Incoming Vnf Name is: " + vnfName)
+
+ String productFamilyId = execution.getVariable("productFamilyId")
+ msoLogger.debug("Incoming Product Family Id is: " + productFamilyId)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ String lcpCloudRegionId = execution.getVariable("lcpCloudRegionId")
+ msoLogger.debug("Incoming LCP Cloud Region Id is: " + lcpCloudRegionId)
+
+ String tenantId = execution.getVariable("tenantId")
+ msoLogger.debug("Incoming Tenant Id is: " + tenantId)
+
+ String disableRollback = execution.getVariable("disableRollback")
+ msoLogger.debug("Incoming Disable Rollback is: " + disableRollback)
+
+ String asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ msoLogger.debug("Incoming asdcServiceModelVersion: " + asdcServiceModelVersion)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ msoLogger.debug("Generated Vnf Id is: " + vnfId)
+ }
+ }
+ execution.setVariable("vnfId", vnfId)
+
+ // Set aLaCarte to false
+ execution.setVariable("aLaCarte", false)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ def isTest = execution.getVariable("isTest")
+
+ if (isTest == null || isTest == false) {
+ execution.setVariable("isBaseVfModule", "true")
+ }
+ execution.setVariable("numOfCreatedAddOnModules", 0)
+
+ rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", "0")
+ execution.setVariable("rollbackData", rollbackData)
+
+ sleep (20000)
+
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoCreateVnfAndModules PreProcessRequest Process")
+ }
+
+
+ public void queryCatalogDB (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("STARTED DoCreateVnfAndModules QueryCatalogDB Process")
+ try {
+ VnfResource vnf = null
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ // if serviceDecomposition is specified, get info from serviceDecomposition
+ if (serviceDecomposition != null) {
+ msoLogger.debug("Getting Catalog DB data from ServiceDecomposition object: " + serviceDecomposition.toJsonString())
+ List<VnfResource> vnfs = serviceDecomposition.getVnfResources()
+ msoLogger.debug("Read vnfs")
+ if (vnfs == null) {
+ msoLogger.debug("Error - vnfs are empty in serviceDecomposition object")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vnfs are empty")
+ }
+ vnf = vnfs[0]
+ String serviceModelName = serviceDecomposition.getModelInfo().getModelName()
+ vnf.constructVnfType(serviceModelName)
+ String vnfType = vnf.getVnfType()
+ msoLogger.debug("Incoming Vnf Type is: " + vnfType)
+ execution.setVariable("vnfType", vnfType)
+ }
+ else {
+ //Get Vnf Info
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ msoLogger.debug("vnfModelInfo: " + vnfModelInfo)
+ String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationUuid")
+ if (vnfModelCustomizationUuid == null) {
+ vnfModelCustomizationUuid = ""
+ }
+ msoLogger.debug("querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+
+ JSONArray vnfs = cutils.getAllVnfsByVnfModelCustomizationUuid(execution,
+ vnfModelCustomizationUuid)
+ msoLogger.debug("obtained VNF list")
+ // Only one match here
+ JSONObject vnfObject = vnfs[0]
+ vnf = DecomposeJsonUtil.jsonToVnfResource(vnfObject.toString())
+ }
+ msoLogger.debug("Read vnfResource")
+ if (vnf == null) {
+ msoLogger.debug("Error - vnf is empty in serviceDecomposition object")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vnf is null")
+ }
+ execution.setVariable("vnfResourceDecomposition", vnf)
+
+ List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
+ msoLogger.debug("Read vfModules")
+ if (vfModules == null) {
+ msoLogger.debug("Error - vfModules are empty in serviceDecomposition object")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf queryCatalogDB, vf modules are empty")
+ }
+
+ ModuleResource baseVfModule = null
+
+ for (int i = 0; i < vfModules.size; i++) {
+ msoLogger.debug("handling VF Module ")
+ ModuleResource vfModule = vfModules[i]
+ boolean isBase = vfModule.getIsBase()
+ if (isBase) {
+ ModelInfo baseVfModuleModelInfoObject = vfModule.getModelInfo()
+ String baseVfModuleModelInfoWithRoot = baseVfModuleModelInfoObject.toString()
+ String baseVfModuleModelInfo = jsonUtil.getJsonValue(baseVfModuleModelInfoWithRoot, "modelInfo")
+ execution.setVariable("baseVfModuleModelInfo", baseVfModuleModelInfo)
+ String baseVfModuleLabel = vfModule.getVfModuleLabel()
+ execution.setVariable("baseVfModuleLabel", baseVfModuleLabel)
+ String basePersonaModelId = baseVfModuleModelInfoObject.getModelInvariantUuid()
+ execution.setVariable("basePersonaModelId", basePersonaModelId)
+ baseVfModule = vfModule
+ break
+ }
+
+ }
+
+ List<ModuleResource>addOnModules = vfModules - baseVfModule
+
+ int addOnModulesToDeploy = 0
+ if (addOnModules != null) {
+ addOnModulesToDeploy = addOnModules.size
+ }
+
+
+ execution.setVariable("addOnModules", addOnModules)
+ execution.setVariable("addOnModulesToDeploy", addOnModulesToDeploy)
+ execution.setVariable("addOnModulesDeployed", 0)
+
+ }catch(Exception ex) {
+ msoLogger.debug("Error Occured in DoCreateVnfAndModules QueryCatalogDB Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModules QueryCatalogDB Process")
+ }
+
+ // Generate vfModuleId for base VF Module
+ def baseVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("baseVfModuleId", baseVfModuleId)
+ // For JUnits
+ String requestId = execution.getVariable("requestId")
+ if (requestId.equals("testRequestId123")) {
+ execution.setVariable("vnfId", "skask")
+ }
+
+ msoLogger.trace("COMPLETED DoCreateVnfAndModules QueryCatalogDB Process")
+ }
+
+ public void preProcessAddOnModule(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.debug("STARTED preProcessAddOnModule")
+
+ try {
+ List<ModuleResource>addOnModules = execution.getVariable("addOnModules")
+ int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
+
+ ModuleResource addOnModule = addOnModules[addOnIndex]
+
+ msoLogger.debug("Got addon module")
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("addOnVfModuleId", newVfModuleId)
+ execution.setVariable("isBaseVfModule", "false")
+
+ execution.setVariable("instancesOfThisModuleDeployed", 0)
+
+ ModelInfo addOnVfModuleModelInfoObject = addOnModule.getModelInfo()
+ String addOnVfModuleModelInfoWithRoot = addOnVfModuleModelInfoObject.toString()
+ String addOnVfModuleModelInfo = jsonUtil.getJsonValue(addOnVfModuleModelInfoWithRoot, "modelInfo")
+ execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
+ String addOnVfModuleLabel = addOnModule.getVfModuleLabel()
+ execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
+ String addOnPersonaModelId = addOnVfModuleModelInfoObject.getModelInvariantUuid()
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ int addOnInitialCount = addOnModule.getInitialCount()
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessAddOnModule")
+ }
+
+ public void postProcessAddOnModule(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED postProcessAddOnModule")
+
+ try {
+ int addOnModulesDeployed = execution.getVariable("addOnModulesDeployed")
+ execution.setVariable("addOnModulesDeployed", addOnModulesDeployed + 1)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing postProcessAddOnModule ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED postProcessAddOnModule")
+ }
+
+ public void validateBaseModule(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED validateBaseModule")
+
+ try {
+ def baseRollbackData = execution.getVariable("DCVAM_baseRollbackData")
+ def rollbackData = execution.getVariable("rollbackData")
+
+ def baseModuleMap = baseRollbackData.get("VFMODULE")
+ baseModuleMap.each{ k, v -> rollbackData.put("VFMODULE_BASE", "${k}","${v}") }
+ execution.setVariable("rollbackData", rollbackData)
+ msoLogger.debug("addOnModulesDeployed: " + execution.getVariable("addOnModulesDeployed"))
+ msoLogger.debug("addOnModulesToDeploy: " + execution.getVariable("addOnModulesToDeploy"))
+ if (execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")) {
+ msoLogger.debug("More add on modules to deploy")
+ }
+ else {
+ msoLogger.debug("No more add on modules to deploy")
+ }
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing validateBaseModule ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during validateBaseModule Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED validateBaseModule")
+ }
+
+ public void validateAddOnModule(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED validateAddOnModule")
+
+ try {
+ int instancesOfThisModuleDeployed = execution.getVariable("instancesOfThisModuleDeployed")
+ int numOfCreatedAddOnModules = execution.getVariable("numOfCreatedAddOnModules")
+ def addOnRollbackData = execution.getVariable("DCVAM_addOnRollbackData")
+ def rollbackData = execution.getVariable("rollbackData")
+
+ def addOnModuleMap = addOnRollbackData.get("VFMODULE")
+ numOfCreatedAddOnModules = numOfCreatedAddOnModules + 1
+ addOnModuleMap.each{ k, v -> rollbackData.put("VFMODULE_ADDON_" + numOfCreatedAddOnModules, "${k}","${v}") }
+
+ execution.setVariable("DCVAM_addOnRollbackData", null)
+
+ execution.setVariable("instancesOfThisModuleDeployed", instancesOfThisModuleDeployed + 1)
+
+ execution.setVariable("numOfCreatedAddOnModules", numOfCreatedAddOnModules)
+ rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", "${numOfCreatedAddOnModules}")
+ execution.setVariable("rollbackData", rollbackData)
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED validateAddOnModule")
+ }
+
+ public void preProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("preProcessRollback")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("postProcessRollback")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit postProcessRollback")
+ }
+
+ public void createPlatform (DelegateExecution execution) {
+
+ msoLogger.trace("START createPlatform")
+
+ String platformName = execution.getVariable("platformName")
+ String vnfId = execution.getVariable("vnfId")
+
+ msoLogger.debug("Platform NAME: " + platformName)
+ msoLogger.debug("VnfID: " + vnfId)
+
+ if(isBlank(platformName)){
+ msoLogger.debug("platformName was not found. Continuing on with flow...")
+ }else{
+ msoLogger.debug("platformName was found.")
+ try{
+ AAICreateResources aaiCR = new AAICreateResources()
+ aaiCR.createAAIPlatform(platformName, vnfId)
+ }catch(Exception ex){
+ String msg = "Exception in createPlatform. " + ex.getMessage();
+ msoLogger.debug(msg)
+ }
+ }
+ msoLogger.trace("Exit createPlatform")
+ }
+
+ public void createLineOfBusiness (DelegateExecution execution) {
+
+ msoLogger.trace("START createLineOfBusiness")
+
+ String lineOfBusiness = execution.getVariable("lineOfBusiness")
+ String vnfId = execution.getVariable("vnfId")
+
+ msoLogger.debug("LineOfBusiness NAME: " + lineOfBusiness)
+ msoLogger.debug("VnfID: " + vnfId)
+
+ if(isBlank(lineOfBusiness)){
+ msoLogger.debug("LineOfBusiness was not found. Continuing on with flow...")
+ }else{
+ msoLogger.debug("LineOfBusiness was found.")
+ try{
+ AAICreateResources aaiCR = new AAICreateResources()
+ aaiCR.createAAILineOfBusiness(lineOfBusiness, vnfId)
+ }catch(Exception ex){
+ String msg = "Exception in LineOfBusiness. " + ex.getMessage();
+ msoLogger.debug(msg)
+ }
+ }
+ msoLogger.trace("Exit createLineOfBusiness")
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
new file mode 100644
index 0000000000..eafc39b1dd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
@@ -0,0 +1,360 @@
+/*-
+ * ============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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This class supports the macro VID Flow
+ * with the rollback of a creation of a generic vnf and related VF modules.
+ */
+class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVnfAndModulesRollback.class);
+ String Prefix="DCVAMR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED DoCreateVnfAndModulesRollback PreProcessRequest Process")
+
+ try{
+ // Get Rollback Variables
+
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("Incoming RollbackData is: " + rollbackData.toString())
+ execution.setVariable("rolledBack", null)
+ execution.setVariable("rollbackError", null)
+
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ String vnfId = rollbackData.get("VNF", "vnfId")
+ msoLogger.debug("Rollback vnfId is: " + vnfId)
+ execution.setVariable("DCVAMR_vnfId", vnfId)
+
+ execution.setVariable("mso-request-id", execution.getVariable("msoRequestId"))
+
+ execution.setVariable("DCVAMR_rollbackSDNCAssign", rollbackData.get("VNF", "rollbackSDNCAssign"))
+ execution.setVariable("DCVAMR_rollbackSDNCActivate", rollbackData.get("VNF", "rollbackSDNCActivate"))
+ execution.setVariable("DCVAMR_rollbackVnfCreate", rollbackData.get("VNF", "rollbackVnfCreate"))
+
+ String sdncCallbackUrl = rollbackData.get("VNF", "sdncCallbackUrl")
+ msoLogger.debug("Rollback sdncCallbackUrl is: " + sdncCallbackUrl)
+ execution.setVariable("DCVAMR_sdncCallbackUrl", sdncCallbackUrl)
+
+ String tenantId= rollbackData.get("VNF", "tenantId")
+ msoLogger.debug("Rollback tenantId is: " + tenantId)
+ execution.setVariable("DCVAMR_tenantId", tenantId)
+
+ String source= rollbackData.get("VNF", "source")
+ msoLogger.debug("Rollback source is: " + source)
+ execution.setVariable("DCVAMR_source", source)
+
+ String serviceInstanceId = rollbackData.get("VNF", "serviceInstanceId")
+ msoLogger.debug("Rollback serviceInstanceId is: " + serviceInstanceId)
+ execution.setVariable("DCVAMR_serviceInstanceId", serviceInstanceId)
+
+ String cloudSiteId = rollbackData.get("VNF", "cloudSiteId")
+ msoLogger.debug("Rollback cloudSiteId is: " + cloudSiteId)
+ execution.setVariable("DCVAMR_cloudSiteId", cloudSiteId)
+
+ def numOfAddOnModulesString = rollbackData.get("VNFANDMODULES", "numOfCreatedAddOnModules")
+ int numOfAddOnModules = 0
+ if (numOfAddOnModulesString != null) {
+ numOfAddOnModules = Integer.parseInt(numOfAddOnModulesString)
+ }
+ execution.setVariable("DCVAMR_numOfAddOnModules", numOfAddOnModules)
+
+ def baseVfModuleRollbackMap = rollbackData.get("VFMODULE_BASE")
+ if (baseVfModuleRollbackMap == null) {
+ // there are no VF Modules to delete
+ execution.setVariable("DCVAMR_numOfModulesToDelete", 0)
+ }
+ else {
+ execution.setVariable("DCVAMR_numOfModulesToDelete", numOfAddOnModules + 1)
+ }
+
+ // Set aLaCarte to false
+ execution.setVariable("DCVAMR_aLaCarte", false)
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoCreateVnfAndModulesRollback PreProcessRequest method!" + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModulesRollback PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoCreateVnfAndModulesRollback PreProcessRequest Process")
+ }
+
+
+
+ public void preProcessCreateVfModuleRollback(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessCreateVfModuleRollback")
+
+ try {
+
+ def rollbackData = execution.getVariable("rollbackData")
+
+ def vfModuleRollbackData = new RollbackData()
+
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ msoLogger.debug("numOfModulesToDelete: " + numOfModulesToDelete)
+ def moduleMap = null
+
+ if (numOfModulesToDelete > 1) {
+ int addOnModuleIndex = numOfModulesToDelete - 1
+ moduleMap = rollbackData.get("VFMODULE_ADDON_" + addOnModuleIndex)
+ msoLogger.debug("Removing ADDON VF module # " + addOnModuleIndex)
+ }
+ else {
+ moduleMap = rollbackData.get("VFMODULE_BASE")
+ msoLogger.debug("Removing BASE VF module")
+ }
+ moduleMap.each{ k, v -> vfModuleRollbackData.put("VFMODULE", "${k}","${v}") }
+ execution.setVariable("DCVAMR_RollbackData", vfModuleRollbackData)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessCreateVfModuleRollback ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessCreateVfModuleRollback")
+ }
+
+
+ public void postProcessCreateVfModuleRollback(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED postProcessCreateVfModuleRollback")
+ def rolledBack = false
+
+ try {
+ rolledBack = execution.getVariable("DCVM_rolledBack")
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ execution.setVariable("DCVAMR_numOfModulesToDelete", numOfModulesToDelete - 1)
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing postProcessCreateVfModuleRollback ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ if (rolledBack == false) {
+ msoLogger.debug("Failure on DoCreateVfModuleRollback")
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Unsuccessful rollback of DoCreateVfModule ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during rollback of DoCreateVfModule")
+ }
+ msoLogger.trace("COMPLETED postProcessCreateVfModuleRollback")
+ }
+
+
+ public void preProcessSDNCDeactivateRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCDeactivateRequest")
+ def vnfId = execution.getVariable("vnfId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ try{
+ //Build SDNC Request
+
+ String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate")
+
+ deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest)
+ execution.setVariable(Prefix + "deactivateSDNCRequest", deactivateSDNCRequest)
+ msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCDeactivateRequest ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCDeactivateRequest")
+ }
+
+ public void preProcessSDNCUnassignRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCUnassignRequest Process")
+ try{
+ String vnfId = execution.getVariable("vnfId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign")
+
+ execution.setVariable(Prefix + "unassignSDNCRequest", unassignSDNCRequest)
+ msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCUnassignRequest Process")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable(Prefix + "sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def tenantId = execution.getVariable(Prefix + "tenantId")
+ def source = execution.getVariable(Prefix + "source")
+ def vnfId = execution.getVariable(Prefix + "vnfId")
+ def serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+ def cloudSiteId = execution.getVariable(Prefix + "cloudSiteId")
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteVnfInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vnf-request-input>
+ <vnf-name/>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.debug("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.debug("COMPLETED ValidateSDNCResponse Process")
+ }
+
+ public void setSuccessfulRollbackStatus (DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED setSuccessfulRollbackStatus")
+
+ try{
+ // Set rolledBack to true, rollbackError to null
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("rollbackError", null)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing setSuccessfulRollbackStatus ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setSuccessfulRollbackStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED setSuccessfulRollbackStatus")
+ }
+
+ public void setFailedRollbackStatus (DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED setFailedRollbackStatus")
+
+ try{
+ // Set rolledBack to false, rollbackError to actual value, rollbackData to null
+ execution.setVariable("rolledBack", false)
+ def rollbackError = execution.getVariable("rollbackError")
+ if (rollbackError == null) {
+ execution.setVariable("rollbackError", 'Caught exception in DoCreateVnfAndModulesRollback')
+ }
+ execution.setVariable("rollbackData", null)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing setFailedRollbackStatus. ", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setFailedRollbackStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED setFailedRollbackStatus")
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
new file mode 100644
index 0000000000..238ac82c01
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -0,0 +1,640 @@
+/*-
+ * ============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.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.json.JSONArray;
+import org.json.JSONObject;
+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.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+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 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 groovy.json.*
+
+
+
+/**
+ * This groovy class supports the <class>DoDeleteE2EServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCustomDeleteE2EServiceInstance.class);
+
+
+ String Prefix="DDELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ msoLogger.trace("preProcessRequest ")
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ execution.setVariable("serviceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable('mso.workflow.sdncadapter.callback',execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.info("SDNC Callback URL: " + sdncCallbackUrl)
+
+ StringBuilder sbParams = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
+ if (paramsMap != null)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+
+ public void preProcessVFCDelete (DelegateExecution execution) {
+ }
+
+ public void postProcessVFCDelete(DelegateExecution execution, String response, String method) {
+ }
+
+ public void preProcessSDNCDelete (DelegateExecution execution) {
+ msoLogger.trace("preProcessSDNCDelete ")
+ String msg = ""
+
+ try {
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def serviceInstanceName = execution.getVariable("serviceInstanceName")
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("productFamilyId")
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def modelInvariantUuid = ""
+ def modelVersion = ""
+ def modelUuid = ""
+ def modelName = ""
+ if (!isBlank(serviceModelInfo))
+ {
+ modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid")
+ modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+
+ if (modelInvariantUuid == null) {
+ modelInvariantUuid = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUuid == null) {
+ modelUuid = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ }
+ if (serviceInstanceName == null) {
+ serviceInstanceName = ""
+ }
+ if (serviceId == null) {
+ serviceId = ""
+ }
+
+ def siParamsXml = execution.getVariable("siParamsXml")
+ def serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ serviceType = ""
+ }
+
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ String sdncDelete =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${MsoUtils.xmlEscape(serviceType)}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>DeleteServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-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>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ ${siParamsXml}
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ sdncDelete = utils.formatXml(sdncDelete)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ execution.setVariable("sdncDelete", sdncDelete)
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ msoLogger.info("sdncDeactivate:\n" + sdncDeactivate)
+ msoLogger.info("sdncDelete:\n" + sdncDelete)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ msoLogger.info(" *****Exit preProcessSDNCDelete *****")
+ }
+
+ public void postProcessSDNCDelete(DelegateExecution execution, String response, String method) {
+
+ msoLogger.trace("postProcessSDNC " + method + " ")
+ String msg = ""
+
+ /*try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.info("SDNCResponse: " + response)
+ msoLogger.info("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == "true"){
+ msoLogger.info("Good response from SDNC Adapter for service-instance " + method + "response:\n" + response)
+
+ }else{
+ msg = "Bad Response from SDNC Adapter for service-instance " + method
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNC " + method + " Exception:" + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }*/
+ msoLogger.trace("Exit postProcessSDNC " + method + " ")
+ }
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ msoLogger.trace("postProcessAAIGET ")
+ String msg = ""
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+ String serviceType = ""
+
+ if(foundInAAI){
+ msoLogger.info("Found Service-instance in AAI")
+
+ 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)
+ }
+ else
+ {
+ msoLogger.info("SI Data" + siData)
+ //Confirm there are no related service instances (vnf/network or volume)
+ if (utils.nodeExists(siData, "relationship-list")) {
+ msoLogger.info("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)
+ serviceXml.getDocumentElement().normalize()
+ //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()
+ msoLogger.info("ServiceInstance Related NS :" + relatedObject)
+ 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)
+ }
+ }
+ }
+ msoLogger.info("Relationship related to Resource:" + jObj.toString())
+ jArray.put(jObj)
+ }
+ //for overlay/underlay
+ }else if (e.equals("configuration")){
+ def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
+ msoLogger.info("ServiceInstance Related Configuration :" + relatedObject)
+ 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)
+ }
+ }
+ }
+ msoLogger.info("Relationship related to Resource:" + jObj.toString())
+ jArray.put(jObj)
+ }
+ }
+ }
+ }
+ execution.setVariable("serviceRelationShip", jArray.toString())
+ }
+ }
+ }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)
+ }
+ }
+
+ msoLogger.info("Service-instance NOT found in AAI. Silent Success")
+ }
+ }catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIGET ")
+ }
+
+ /**
+ * Deletes the service instance in aai
+ */
+ public void deleteServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("Entered deleteServiceInstance")
+ try {
+ String globalCustId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient();
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+ resourceClient.delete(serviceInstanceUri)
+
+ msoLogger.trace("Exited deleteServiceInstance")
+ }catch(Exception e){
+ msoLogger.debug("Error occured within deleteServiceInstance method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during deleteServiceInstance from aai")
+ }
+ }
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ msoLogger.trace("STARTED preInitResourcesOperStatus Process ")
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = execution.getVariable("operationType")
+ String resourceTemplateUUIDs = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service creation"
+ msoLogger.info("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+ // we use resource instance ids for delete flow as resourceTemplateUUIDs
+ /*[
+ {
+ "resourceInstanceId":"1111",
+ "resourceType":"vIMS"
+ },
+ {
+ "resourceInstanceId":"222",
+ "resourceType":"vEPC"
+ },
+ {
+ "resourceInstanceId":"3333",
+ "resourceType":"overlay"
+ },
+ {
+ "resourceInstanceId":"4444",
+ "resourceType":"underlay"
+ }
+ ]*/
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ if (relationShipList != null) {
+ relationShipList.each {
+ resourceTemplateUUIDs = resourceTemplateUUIDs + it.resourceInstanceId + ":"
+ }
+ }
+ execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ msoLogger.info("Outgoing initResourceOperationStatus: \n" + payload)
+ msoLogger.debug("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch(Exception e){
+ 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 ")
+ }
+
+ /**
+ * prepare delete parameters
+ */
+ public void preResourceDelete(execution, resourceName){
+ // we use resource instance ids for delete flow as resourceTemplateUUIDs
+ /*[
+ {
+ "resourceInstanceId":"1111",
+ "resourceType":"vIMS"
+ },
+ {
+ "resourceInstanceId":"222",
+ "resourceType":"vEPC"
+ },
+ {
+ "resourceInstanceId":"3333",
+ "resourceType":"overlay"
+ },
+ {
+ "resourceInstanceId":"4444",
+ "resourceType":"underlay"
+ }
+ ]*/
+ msoLogger.trace("STARTED preResourceDelete Process ")
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ if (relationShipList != null) {
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, resourceName)) {
+ String resourceInstanceUUID = it.resourceInstanceId
+ String resourceTemplateUUID = it.resourceInstanceId
+ execution.setVariable("resourceTemplateId", resourceTemplateUUID)
+ execution.setVariable("resourceInstanceId", resourceInstanceUUID)
+ execution.setVariable("resourceType", resourceName)
+ msoLogger.info("Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " + resourceInstanceUUID + " resourceType: " + resourceName)
+ }
+ }
+ }
+ msoLogger.trace("END preResourceDelete Process ")
+ }
+
+ public void sequenceResource(execution){
+ msoLogger.trace("STARTED sequenceResource Process ")
+ List<String> nsResources = new ArrayList<String>()
+ List<String> wanResources = new ArrayList<String>()
+ List<String> resourceSequence = new ArrayList<String>()
+
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+
+
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ if (relationShipList != null) {
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, "overlay") || StringUtils.containsIgnoreCase(it.resourceType, "underlay")){
+ wanResources.add(it.resourceType)
+ }else{
+ nsResources.add(it.resourceType)
+ }
+ }
+ }
+ resourceSequence.addAll(wanResources)
+ resourceSequence.addAll(nsResources)
+ String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("resourceSequence", resourceSequence)
+ msoLogger.info("resourceSequence: " + resourceSequence)
+ execution.setVariable("wanResources", wanResources)
+ msoLogger.trace("END sequenceResource Process ")
+ }
+
+ public void getCurrentResource(execution){
+ msoLogger.trace("Start getCurrentResoure Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ List<String> wanResources = execution.getVariable("wanResources")
+ String resourceName = resourceSequence.get(currentIndex)
+ execution.setVariable("resourceType",resourceName)
+ if(wanResources.contains(resourceName)){
+ execution.setVariable("controllerInfo", "SDN-C")
+ }else{
+ execution.setVariable("controllerInfo", "VF-C")
+ }
+ msoLogger.trace("COMPLETED getCurrentResoure Process ")
+ }
+
+ public void parseNextResource(execution){
+ msoLogger.trace("Start parseNextResource Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ if(nextIndex >= resourceSequence.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ msoLogger.trace("COMPLETED parseNextResource Process ")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
new file mode 100644
index 0000000000..20a7f43de7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -0,0 +1,1132 @@
+/*-
+ * ============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.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.json.JSONArray;
+import org.json.JSONObject;
+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.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+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.springframework.web.util.UriUtils;
+
+import groovy.json.*
+
+
+
+/**
+ * This groovy class supports the <class>DoDeleteE2EServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCustomDeleteE2EServiceInstanceV2.class);
+
+
+ String Prefix="DDELSI_"
+ private static final String DebugFlag = "isDebugEnabled"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.buildAPPCRequest(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ msoLogger.trace("preProcessRequest ")
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ execution.setVariable("serviceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.info("SDNC Callback URL: " + sdncCallbackUrl)
+
+ StringBuilder sbParams = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
+ if (paramsMap != null)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+ execution.setVariable("operationStatus", "Waiting delete resource...")
+ execution.setVariable("progress", "0")
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessAAIGET(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ String msg = ""
+
+ 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 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)
+ }
+
+ }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)
+ }
+ }
+
+ msoLogger.info("Service-instance NOT found in AAI. Silent Success")
+ }
+ }catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Bpmn error encountered in " + method + "--" + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+ private void loadResourcesProperties(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.loadResourcesProperties(' +'execution=' + execution.getId() +')'
+ def isDebugEnabled = execution.getVariable("isDebugEnabled")
+ msoLogger.info("Entered " + method)
+ String loadFilePath = "/etc/mso/config.d/reources.json"
+ try{
+ def jsonPayload = new File(loadFilePath).text
+ msoLogger.info("jsonPayload: " + jsonPayload)
+
+ String resourcesProperties = jsonUtil.prettyJson(jsonPayload.toString())
+ msoLogger.info("resourcesProperties: " + resourcesProperties)
+
+ String createResourceSort = jsonUtil.getJsonValue(resourcesProperties, "CreateResourceSort")
+ msoLogger.info("createResourceSort: " + createResourceSort)
+ execution.setVariable("createResourceSort", createResourceSort)
+
+ String deleteResourceSort = jsonUtil.getJsonValue(resourcesProperties, "DeleteResourceSort")
+ msoLogger.info("deleteResourceSort: " + deleteResourceSort)
+ execution.setVariable("deleteResourceSort", deleteResourceSort)
+
+
+ String resourceControllerType = jsonUtil.getJsonValue(resourcesProperties, "ResourceControllerType")
+ msoLogger.info("resourceControllerType: " + resourceControllerType)
+ execution.setVariable("resourceControllerType", resourceControllerType)
+
+
+ }catch(Exception ex){
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+ }
+ private void sortDeleteResource(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sortDeleteResource(' +'execution=' + execution.getId() +')'
+ def isDebugEnabled = execution.getVariable("isDebugEnabled")
+ msoLogger.info("Entered " + method)
+ String deleteResourceSortDef = """[
+ {
+ "resourceType":"GRE_SAR"
+ },
+ {
+ "resourceType":"VPN_SAR"
+ },
+ {
+ "resourceType":"APN_AAR"
+ },
+ {
+ "resourceType":"GRE_AAR"
+ },
+ {
+ "resourceType":"Overlay"
+ },
+ {
+ "resourceType":"Underlay"
+ },
+ {
+ "resourceType":"vIMS"
+ },
+ {
+ "resourceType":"vCPE"
+ },
+ {
+ "resourceType":"vFW"
+ },
+ {
+ "resourceType":"vEPC"
+ }
+
+
+ ]""".trim()
+
+ try{
+ loadResourcesProperties(execution)
+ String deleteResourceSort = execution.getVariable("deleteResourceSort")
+ if (isBlank(deleteResourceSort)) {
+ deleteResourceSort = deleteResourceSortDef;
+ }
+
+ List<String> sortResourceList = jsonUtil.StringArrayToList(execution, deleteResourceSort)
+ msoLogger.info("sortResourceList : " + sortResourceList)
+
+ JSONArray newResourceList = new JSONArray()
+ int resSortCount = sortResourceList.size()
+
+ for ( int currentResource = 0 ; currentResource < resSortCount ; currentResource++ ) {
+ String currentSortResource = sortResourceList[currentResource]
+ String sortResourceType = jsonUtil.getJsonValue(currentSortResource, "resourceType")
+ List<String> resourceList = execution.getVariable(Prefix+"resourceList")
+
+ for (String resource : resourceList) {
+ msoLogger.info("resource : " + resource)
+ String resourceType = jsonUtil.getJsonValue(resource, "resourceType")
+
+ if (StringUtils.containsIgnoreCase(resourceType, sortResourceType)) {
+ JSONObject jsonObj = new JSONObject(resource)
+ newResourceList.put(jsonObj)
+ }
+ msoLogger.info("Get next sort type " )
+ }
+ }
+
+ String newResourceStr = newResourceList.toString()
+ List<String> newResourceListStr = jsonUtil.StringArrayToList(execution, newResourceStr)
+
+ execution.setVariable(Prefix+"resourceList", newResourceListStr)
+ msoLogger.info("newResourceList : " + newResourceListStr)
+
+ }catch(Exception ex){
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+
+ }
+ public void prepareServiceDeleteResource(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepareServiceDeleteResource(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ try {
+
+ 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)
+
+ msoLogger.info("aaiJsonRecord: " +aaiJsonRecord)
+ def serviceInstanceName = jsonUtil.getJsonValue(aaiJsonRecord, "service-instance.service-instance-name")
+ execution.setVariable("serviceInstanceName",serviceInstanceName)
+
+ def serviceType = jsonUtil.getJsonValue(aaiJsonRecord, "service-instance.service-type")
+ execution.setVariable("serviceType",serviceType)
+
+
+ String relationshipList = jsonUtil.getJsonValue(aaiJsonRecord, "service-instance.relationship-list")
+ msoLogger.info("relationship-list:" + relationshipList)
+ if (! isBlank(relationshipList)){
+ msoLogger.info("relationship-list exists" )
+ String relationShip = jsonUtil.getJsonValue(relationshipList, "relationship")
+ msoLogger.info("relationship: " + relationShip)
+ JSONArray allResources = new JSONArray()
+ JSONArray serviceResources = new JSONArray()
+ JSONArray networkResources = new JSONArray()
+ JSONArray allottedResources = new JSONArray()
+
+
+ if (! isBlank(relationShip)){
+ JSONArray jsonArray = new JSONArray();
+ if (relationShip.startsWith("{") && relationShip.endsWith("}")) {
+ JSONObject jsonObject = new JSONObject(relationShip);
+ jsonArray.put(jsonObject);
+ } else if (relationShip.startsWith("[") && relationShip.endsWith("]")) {
+ jsonArray = new JSONArray(relationShip);
+ } else {
+ msoLogger.info("The relationShip fomart is error" )
+ }
+
+ List<String> relationList = jsonUtil.StringArrayToList(execution, jsonArray.toString())
+
+ msoLogger.info("relationList: " + relationList)
+
+ int relationNum =relationList.size()
+ msoLogger.info("**************relationList size: " + relationNum)
+
+ for ( int currentRelation = 0 ; currentRelation < relationNum ; currentRelation++ ) {
+ msoLogger.info("current Relation num: " + currentRelation)
+ String relation = relationList[currentRelation]
+ msoLogger.info("relation: " + relation)
+
+ String relatedTo = jsonUtil.getJsonValue(relation, "related-to")
+ msoLogger.info("relatedTo: " + relatedTo)
+
+ String relatedLink = jsonUtil.getJsonValue(relation, "related-link")
+ msoLogger.info("relatedLink: " + relatedLink)
+
+ if (StringUtils.equalsIgnoreCase(relatedTo, "allotted-resource")) {
+ msoLogger.info("allotted-resource exists ")
+
+ String aaiArRsp = getAaiAr(execution, relatedLink)
+ msoLogger.info("aaiArRsp: " + aaiArRsp)
+ if (! isBlank(aaiArRsp)) {
+ def type = utils.getNodeText(aaiArRsp, "type")
+ def id = utils.getNodeText(aaiArRsp, "id")
+ def role = utils.getNodeText(aaiArRsp, "role")
+ def resourceVersion = utils.getNodeText(aaiArRsp, "resource-version")
+
+ JSONObject jObject = new JSONObject()
+ jObject.put("resourceType", type)
+ jObject.put("resourceInstanceId", id)
+ jObject.put("resourceRole", role)
+ jObject.put("resourceVersion", resourceVersion)
+
+ allResources.put(jObject)
+ msoLogger.info("allResources: " + allResources)
+ allottedResources.put(jObject)
+ msoLogger.info("allottedResources: " + allottedResources)
+ }
+ }
+ else if (StringUtils.equalsIgnoreCase(relatedTo, "service-instance")){
+ msoLogger.info("service-instance exists ")
+ JSONObject jObject = new JSONObject()
+
+ //relationship-data
+ String rsDataStr = jsonUtil.getJsonValue(relation, "relationship-data")
+ msoLogger.info("rsDataStr: " + rsDataStr)
+ List<String> rsDataList = jsonUtil.StringArrayToList(execution, rsDataStr)
+ msoLogger.info("rsDataList: " + rsDataList)
+ for(String rsData : rsDataList){
+ msoLogger.info("rsData: " + rsData)
+ def eKey = jsonUtil.getJsonValue(rsData, "relationship-key")
+ def eValue = jsonUtil.getJsonValue(rsData, "relationship-value")
+ if(eKey.equals("service-instance.service-instance-id")){
+ jObject.put("resourceInstanceId", eValue)
+ }
+ if(eKey.equals("service-subscription.service-type")){
+ jObject.put("resourceType", eValue)
+ }
+ }
+
+ //related-to-property
+ String rPropertyStr = jsonUtil.getJsonValue(relation, "related-to-property")
+ msoLogger.info("related-to-property: " + rPropertyStr)
+ if (rPropertyStr instanceof JSONArray){
+ List<String> rPropertyList = jsonUtil.StringArrayToList(execution, rPropertyStr)
+ for (String rProperty : rPropertyList) {
+ msoLogger.info("rProperty: " + rProperty)
+ def eKey = jsonUtil.getJsonValue(rProperty, "property-key")
+ def eValue = jsonUtil.getJsonValue(rProperty, "property-value")
+ if(eKey.equals("service-instance.service-instance-name")){
+ jObject.put("resourceName", eValue)
+ }
+ }
+ }
+ else {
+ String rProperty = rPropertyStr
+ msoLogger.info("rProperty: " + rProperty)
+ def eKey = jsonUtil.getJsonValue(rProperty, "property-key")
+ def eValue = jsonUtil.getJsonValue(rProperty, "property-value")
+ if (eKey.equals("service-instance.service-instance-name")) {
+ jObject.put("resourceName", eValue)
+ }
+ }
+
+ allResources.put(jObject)
+ msoLogger.info("allResources: " + allResources)
+
+ serviceResources.put(jObject)
+ msoLogger.info("serviceResources: " + serviceResources)
+ }
+ else if (StringUtils.equalsIgnoreCase(relatedTo, "configuration")) {
+ msoLogger.info("configuration ")
+ JSONObject jObject = new JSONObject()
+
+ //relationship-data
+ String rsDataStr = jsonUtil.getJsonValue(relation, "relationship-data")
+ msoLogger.info("rsDataStr: " + rsDataStr)
+ List<String> rsDataList = jsonUtil.StringArrayToList(execution, rsDataStr)
+ msoLogger.info("rsDataList: " + rsDataList)
+ for (String rsData : rsDataList) {
+ msoLogger.info("rsData: " + rsData)
+ def eKey = jsonUtil.getJsonValue(rsData, "relationship-key")
+ def eValue = jsonUtil.getJsonValue(rsData, "relationship-value")
+ if(eKey.equals("configuration.configuration-id")){
+ jObject.put("resourceInstanceId", eValue)
+ }
+ }
+
+
+ //related-to-property
+ String rPropertyStr = jsonUtil.getJsonValue(relation, "related-to-property")
+ msoLogger.info("related-to-property: " + rPropertyStr)
+ if (rPropertyStr instanceof JSONArray){
+ List<String> rPropertyList = jsonUtil.StringArrayToList(execution, rPropertyStr)
+ for(String rProperty : rPropertyList){
+ msoLogger.info("rProperty: " + rProperty)
+ def eKey = jsonUtil.getJsonValue(rProperty, "property-key")
+ def eValue = jsonUtil.getJsonValue(rProperty, "property-value")
+ if(eKey.equals("configuration.configuration-type")){
+ jObject.put("resourceType", eValue)
+ }
+ }
+ }
+ else {
+ String rProperty = rPropertyStr
+ msoLogger.info("rProperty: " + rProperty)
+ def eKey = jsonUtil.getJsonValue(rProperty, "property-key")
+ def eValue = jsonUtil.getJsonValue(rProperty, "property-value")
+ if(eKey.equals("configuration.configuration-type")){
+ jObject.put("resourceType", eValue)
+ }
+ }
+ allResources.put(jObject)
+ msoLogger.info("allResources: " + allResources)
+
+ networkResources.put(jObject)
+ msoLogger.info("networkResources: " + networkResources)
+ }
+ msoLogger.info("Get Next releation resource " )
+
+ }
+ msoLogger.info("Get releation finished. " )
+ }
+
+ execution.setVariable("serviceRelationShip", allResources.toString())
+ msoLogger.info("allResources: " + allResources.toString())
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ msoLogger.info("serviceRelationShip: " + serviceRelationShip)
+ if ((! isBlank(serviceRelationShip)) && (! serviceRelationShip.isEmpty())) {
+
+ List<String> relationShipList = jsonUtil.StringArrayToList(execution, serviceRelationShip)
+ msoLogger.info("relationShipList: " + relationShipList)
+ execution.setVariable(Prefix+"resourceList", relationShipList)
+
+ int resourceCount = relationShipList.size()
+ msoLogger.info("resourceCount: " + resourceCount)
+ execution.setVariable(Prefix+"resourceCount",resourceCount )
+
+ int resourceNum = 0
+ execution.setVariable(Prefix+"nextResource", resourceNum)
+ msoLogger.info("start sort delete resource: ")
+ sortDeleteResource(execution)
+
+
+ if (resourceNum < resourceCount) {
+ execution.setVariable(Prefix+"resourceFinish", false)
+ }
+ else {
+ execution.setVariable(Prefix+"resourceFinish", true)
+ }
+ msoLogger.info("Resource list set end : " + resourceCount)
+ }
+
+ execution.setVariable("serviceResources", serviceResources.toString())
+ msoLogger.info("serviceResources: " + serviceResources)
+ String serviceResourcesShip = execution.getVariable("serviceResources")
+ msoLogger.info("serviceResourcesShip: " + serviceResourcesShip)
+
+ if ((! isBlank(serviceResourcesShip)) && (! serviceResourcesShip.isEmpty())) {
+ List<String> serviceResourcesList = jsonUtil.StringArrayToList(execution, serviceResourcesShip)
+ msoLogger.info("serviceResourcesList: " + serviceResourcesList)
+ execution.setVariable(Prefix+"serviceResourceList", serviceResourcesList)
+ execution.setVariable(Prefix+"serviceResourceCount", serviceResourcesList.size())
+ execution.setVariable(Prefix+"nextServiceResource", 0)
+ msoLogger.info("Service Resource list set end : " + serviceResourcesList.size())
+
+ }
+
+ execution.setVariable("allottedResources", allottedResources.toString())
+ msoLogger.info("allottedResources: " + allottedResources)
+ String allottedResourcesShip = execution.getVariable("allottedResources")
+ msoLogger.info("allottedResourcesShip: " + allottedResourcesShip)
+ if ((! isBlank(allottedResourcesShip)) && (! allottedResourcesShip.isEmpty())) {
+ List<String> allottedResourcesList = jsonUtil.StringArrayToList(execution, allottedResourcesShip)
+ msoLogger.info("allottedResourcesList: " + allottedResourcesList)
+ execution.setVariable(Prefix+"allottedResourcesList", allottedResourcesList)
+ execution.setVariable(Prefix+"allottedResourcesListCount", allottedResourcesList.size())
+ execution.setVariable(Prefix+"nextAllottedResourcesList", 0)
+ msoLogger.info("Allotted Resource list set end : " + allottedResourcesList.size())
+
+ }
+ execution.setVariable("networkResources", networkResources.toString())
+ msoLogger.info("networkResources: " + networkResources)
+ String networkResourcesShip = execution.getVariable("networkResources")
+ msoLogger.info("networkResourcesShip: " + networkResourcesShip)
+ if ((! isBlank(networkResourcesShip)) && (! networkResourcesShip.isEmpty())) {
+ List<String> networkResourcesList = jsonUtil.StringArrayToList(execution, networkResourcesShip)
+ msoLogger.info("networkResourcesList: " + networkResourcesList)
+ execution.setVariable(Prefix+"networkResourcesList", networkResourcesList)
+ execution.setVariable(Prefix+"networkResourcesListCount", networkResourcesList.size())
+ execution.setVariable(Prefix+"nextNetworkResourcesList", 0)
+ msoLogger.info("Network Resource list set end : " + networkResourcesList.size())
+
+ }
+ }
+ } catch (BpmnError e){
+ throw e;
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DeleteMobileAPNCustService flow. prepareServiceDeleteResource() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+ private String getAaiAr(DelegateExecution execution, String relink) {
+ def method = getClass().getSimpleName() + '.getAaiAr(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = execution.getVariable("URN_aai_endpoint") + 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 null
+ }
+
+ msoLogger.info("Exited " + method)
+ return aaiResponse
+ }
+ /**
+ * prepare Decompose next resource to create request
+ */
+ public void preProcessDecomposeNextResource(DelegateExecution execution){
+ def method = getClass().getSimpleName() + '.getAaiAr(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ msoLogger.trace("STARTED preProcessDecomposeNextResource Process ")
+ try{
+ int resourceNum = execution.getVariable(Prefix+"nextServiceResource")
+ List<String> serviceResourceList = execution.getVariable(Prefix+"serviceResourceList")
+ msoLogger.info("Service Resource List : " + serviceResourceList)
+
+ String serviceResource = serviceResourceList[resourceNum]
+ execution.setVariable(Prefix+"serviceResource", serviceResource)
+ msoLogger.info("Current Service Resource : " + serviceResource)
+
+ String resourceType = jsonUtil.getJsonValue(serviceResource, "resourceType")
+ execution.setVariable("resourceType", resourceType)
+ msoLogger.info("resourceType : " + resourceType)
+
+ String resourceInstanceId = jsonUtil.getJsonValue(serviceResource, "resourceInstanceId")
+ execution.setVariable("resourceInstanceId", resourceInstanceId)
+ msoLogger.info("resourceInstanceId : " + resourceInstanceId)
+
+ String resourceRole = jsonUtil.getJsonValue(serviceResource, "resourceRole")
+ execution.setVariable("resourceRole", resourceRole)
+ msoLogger.info("resourceRole : " + resourceRole)
+
+ String resourceVersion = jsonUtil.getJsonValue(serviceResource, "resourceVersion")
+ execution.setVariable("resourceVersion", resourceVersion)
+ msoLogger.info("resourceVersion : " + resourceVersion)
+
+ String resourceName = jsonUtil.getJsonValue(serviceResource, "resourceName")
+ if (isBlank(resourceName)){
+ resourceName = resourceInstanceId
+ }
+ execution.setVariable(Prefix+"resourceName", resourceName)
+ msoLogger.info("resource Name : " + resourceName)
+
+
+ execution.setVariable(Prefix+"nextServiceResource", resourceNum + 1)
+
+ int serviceResourceCount = execution.getVariable(Prefix+"serviceResourceCount")
+ if (serviceResourceCount >0 ){
+ int progress = (resourceNum*100) / serviceResourceCount
+ execution.setVariable("progress", progress.toString() )
+ }
+ execution.setVariable("operationStatus", resourceName )
+
+ }catch(Exception e){
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateMobileAPNCustService flow. Unexpected Error from method preProcessDecomposeNextResource() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+ }
+ /**
+ * post Decompose next resource to create request
+ */
+ public void postProcessDecomposeNextResource(DelegateExecution execution){
+ def method = getClass().getSimpleName() + '.postProcessDecomposeNextResource(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ msoLogger.trace("STARTED postProcessDecomposeNextResource Process ")
+ try{
+ String resourceName = execution.getVariable(Prefix+"resourceName")
+ int resourceNum = execution.getVariable(Prefix+"nextServiceResource")
+ msoLogger.debug("Current Resource count:"+ execution.getVariable(Prefix+"nextServiceResource"))
+
+ int resourceCount = execution.getVariable(Prefix+"serviceResourceCount")
+ msoLogger.debug("Total Resource count:"+ execution.getVariable(Prefix+"serviceResourceCount"))
+
+ if (resourceNum < resourceCount) {
+ execution.setVariable(Prefix+"resourceFinish", false)
+ }
+ else {
+ execution.setVariable(Prefix+"resourceFinish", true)
+ }
+
+ msoLogger.debug("Resource Finished:"+ execution.getVariable(Prefix+"resourceFinish"))
+
+ if (resourceCount >0 ){
+ int progress = (resourceNum*100) / resourceCount
+
+ execution.setVariable("progress", progress.toString() )
+ msoLogger.trace(":"+ execution.getVariable(""))
+ }
+ execution.setVariable("operationStatus", resourceName )
+
+
+ }catch(Exception e){
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateMobileAPNCustService flow. Unexpected Error from method postProcessDecomposeNextResource() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+ }
+ /**
+ * prepare post Unkown Resource Type
+ */
+ public void postOtherControllerType(DelegateExecution execution){
+ def method = getClass().getSimpleName() + '.postOtherControllerType(' +'execution=' + execution.getId() +')'
+ def isDebugEnabled = execution.getVariable("isDebugEnabled")
+ msoLogger.info("Entered " + method)
+
+ try{
+
+ String resourceName = execution.getVariable(Prefix+"resourceName")
+ String resourceType = execution.getVariable(Prefix+"resourceType")
+ String controllerType = execution.getVariable("controllerType")
+
+ String msg = "Resource name: "+ resourceName + " resource Type: " + resourceType+ " controller Type: " + controllerType + " can not be processed n the workflow"
+ msoLogger.debug(msg)
+
+ }catch(Exception e){
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DoCreateMobileAPNServiceInstance flow. Unexpected Error from method postOtherControllerType() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+ /**
+ * prepare delete parameters
+ */
+ public void preSDNCResourceDelete(execution, resourceName){
+ // we use resource instance ids for delete flow as resourceTemplateUUIDs
+
+ def method = getClass().getSimpleName() + '.preSDNCResourceDelete(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ msoLogger.trace("STARTED preSDNCResourceDelete Process ")
+ String networkResources = execution.getVariable("networkResources")
+
+
+ execution.setVariable("foundResource", false)
+ if (networkResources != null) {
+ def jsonSlurper = new JsonSlurper()
+ List relationShipList = jsonSlurper.parseText(networkResources)
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, resourceName)) {
+ String resourceInstanceUUID = it.resourceInstanceId
+ String resourceTemplateUUID = it.resourceInstanceId
+ execution.setVariable("resourceTemplateId", resourceTemplateUUID)
+ execution.setVariable("resourceInstanceId", resourceInstanceUUID)
+ execution.setVariable("resourceType", resourceName)
+ execution.setVariable("foundResource", true)
+ msoLogger.info("Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " + resourceInstanceUUID + " resourceType: " + resourceName)
+ }
+ }
+ }
+ msoLogger.info("Exited " + method)
+ }
+ public void preProcessSDNCDelete (DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCDelete(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ msoLogger.trace("preProcessSDNCDelete ")
+ String msg = ""
+
+ try {
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def serviceInstanceName = execution.getVariable("serviceInstanceName")
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("productFamilyId")
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def modelInvariantUuid = ""
+ def modelVersion = ""
+ def modelUuid = ""
+ def modelName = ""
+ if (!isBlank(serviceModelInfo))
+ {
+ modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid")
+ modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+
+ if (modelInvariantUuid == null) {
+ modelInvariantUuid = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUuid == null) {
+ modelUuid = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ }
+ if (serviceInstanceName == null) {
+ serviceInstanceName = ""
+ }
+ if (serviceId == null) {
+ serviceId = ""
+ }
+
+ def siParamsXml = execution.getVariable("siParamsXml")
+ def serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ serviceType = ""
+ }
+
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ String sdncDelete =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${MsoUtils.xmlEscape(serviceType)}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>DeleteServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-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>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ ${siParamsXml}
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ sdncDelete = utils.formatXml(sdncDelete)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ execution.setVariable("sdncDelete", sdncDelete)
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ msoLogger.info("sdncDeactivate:\n" + sdncDeactivate)
+ msoLogger.info("sdncDelete:\n" + sdncDelete)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+ public void postProcessSDNCDelete(DelegateExecution execution, String response, String action) {
+
+ def method = getClass().getSimpleName() + '.postProcessSDNCDelete(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ msoLogger.trace("postProcessSDNC " + action + " ")
+ String msg = ""
+
+ /*try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.info("SDNCResponse: " + response)
+ msoLogger.info("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == "true"){
+ msoLogger.info("Good response from SDNC Adapter for service-instance " + action + "response:\n" + response)
+
+ }else{
+ msg = "Bad Response from SDNC Adapter for service-instance " + action
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNC " + action + " Exception:" + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }*/
+ msoLogger.info("Exited " + method)
+ }
+
+ /**
+ * Init the service Operation Status
+ */
+ public void preUpdateServiceOperationStatus(DelegateExecution execution){
+ def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String serviceName = execution.getVariable("serviceInstanceName")
+ String operationType = "DELETE"
+ String userId = ""
+ String result = "processing"
+ String progress = execution.getVariable("progress")
+ msoLogger.info("progress: " + progress )
+ if ("100".equalsIgnoreCase(progress))
+ {
+ result = "finished"
+ }
+ String reason = ""
+ String operationContent = "Prepare service delete: " + execution.getVariable("operationStatus")
+ msoLogger.info("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <serviceName>${MsoUtils.xmlEscape(serviceName)}</serviceName>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ msoLogger.info("Outgoing preUpdateServiceOperationStatus: \n" + payload)
+
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preUpdateServiceOperationStatus.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preUpdateServiceOperationStatus Process ")
+ msoLogger.info("Exited " + method)
+ }
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ def method = getClass().getSimpleName() + '.preInitResourcesOperStatus(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ msoLogger.trace("STARTED preInitResourcesOperStatus Process ")
+ String msg=""
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = "DELETE"
+ String resourceTemplateUUIDs = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service delete"
+ msoLogger.info("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ msoLogger.info("serviceRelationShip: " + serviceRelationShip)
+ if (! isBlank(serviceRelationShip)) {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ if (relationShipList != null) {
+ relationShipList.each {
+ resourceTemplateUUIDs = resourceTemplateUUIDs + it.resourceInstanceId + ":"
+ }
+ }
+ }
+ def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ msoLogger.info("Outgoing initResourceOperationStatus: \n" + payload)
+ msoLogger.debug("DoCustomDeleteE2EServiceInstanceV2 Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCustomDeleteE2EServiceInstanceV2.preInitResourcesOperStatus. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+
+
+ /**
+ * prepare delete parameters
+ */
+ public void preProcessVFCResourceDelete(execution){
+ // we use resource instance ids for delete flow as resourceTemplateUUIDs
+
+ def method = getClass().getSimpleName() + '.preProcessVFCResourceDelete(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ msoLogger.trace("STARTED preProcessVFCResourceDelete Process ")
+ try{
+ String serviceResource = execution.getVariable("serviceResource")
+ msoLogger.info("serviceResource : " + serviceResource)
+
+ String resourceInstanceId = execution.getVariable("resourceInstanceId")
+ msoLogger.info("resourceInstanceId : " + resourceInstanceId)
+
+ execution.setVariable("resourceTemplateId", resourceInstanceId)
+ msoLogger.info("resourceTemplateId : " + resourceInstanceId)
+
+ String resourceType = execution.getVariable("resourceType")
+ msoLogger.info("resourceType : " + resourceType)
+
+
+ String resourceName = execution.getVariable(Prefix+"resourceName")
+ if (isBlank(resourceName)){
+ resourceName = resourceInstanceId
+ }
+ execution.setVariable("resourceName", resourceName)
+ msoLogger.info("resource Name : " + resourceName)
+
+ msoLogger.info("Delete Resource Info: resourceInstanceId :" + resourceInstanceId + " resourceTemplateId: " + resourceInstanceId + " resourceType: " + resourceType)
+ }catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.preProcessVFCResourceDelete. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.info("Exited " + method)
+ }
+
+ public void postProcessVFCDelete(DelegateExecution execution, String response, String action) {
+ def method = getClass().getSimpleName() + '.postProcessVFCDelete(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+
+ msoLogger.trace("STARTED postProcessVFCDelete Process ")
+ try{
+
+ }catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.postProcessVFCDelete. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.info("Exited " + method)
+ }
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
new file mode 100644
index 0000000000..54dfae3760
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -0,0 +1,439 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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.json.JSONArray
+import org.json.JSONObject;
+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.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.json.JsonUtils
+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.*
+
+/**
+ * This groovy class supports the <class>DoDeleteE2EServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * @param - delResourceList
+ * @param - serviceRelationShip
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DDEESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** preProcessRequest *****", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ execution.setVariable("serviceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ StringBuilder sbParams = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
+ if (paramsMap != null)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ 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 to delete id:" + serviceInstanceId
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else
+ {
+ InputSource source = new InputSource(new StringReader(siData));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document serviceXml = docBuilder.parse(source)
+ serviceXml.getDocumentElement().normalize()
+ // get model invariant id
+ // 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 = serviceXml.getElementsByTagName("model-invariant-id").item(0).getTextContent()
+ def modelVersionId = serviceXml.getElementsByTagName("model-version-id").item(0).getTextContent()
+
+ // Set Original Template info
+ execution.setVariable("model-invariant-id-original", modelInvariantId)
+ execution.setVariable("model-version-id-original", modelVersionId)
+ }
+
+ utils.log("INFO", "SI Data" + siData, isDebugEnabled)
+ //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)
+ }
+ }
+ }
+ }
+ 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) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ }
+
+ public void getCurrentNS(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start getCurrentNS Process ======== ", isDebugEnabled)
+
+ def currentIndex = execution.getVariable("currentNSIndex")
+ List<String> nsSequence = execution.getVariable("nsSequence")
+ String nsResourceType = nsSequence.get(currentIndex)
+
+ // GET AAI by Name, not ID, for process convenient
+ execution.setVariable("GENGS_type", "service-instance")
+ execution.setVariable("GENGS_serviceInstanceId", "")
+ execution.setVariable("GENGS_serviceInstanceName", nsResourceType)
+
+ utils.log("INFO", "======== COMPLETED getCurrentNS Process ======== ", isDebugEnabled)
+ }
+
+ public void prepareDecomposeService(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ String modelInvariantUuid = execution.getVariable("model-invariant-id-original")
+ String modelVersionId = execution.getVariable("model-version-id-original")
+
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelVersionId}",
+ "modelVersion":""
+ }"""
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ utils.log("DEBUG", " ***** Completed prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void postDecomposeService(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside processDecomposition() of delete generic e2e service flow ***** ", isDebugEnabled)
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ // service model info
+ execution.setVariable("serviceModelInfo", serviceDecomposition.getModelInfo())
+
+ List<Resource> deleteResourceList = serviceDecomposition.getServiceResources()
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ List relationShipList = null
+ if (serviceRelationShip != null) {
+ relationShipList = jsonSlurper.parseText(serviceRelationShip)
+ }
+
+ //Set the real resource instance id to the decomosed resource list
+ for (Resource resource: deleteResourceList) {
+ //reset the resource instance id , because in the decompose flow ,its a random one.
+ resource.setResourceId("");
+ //match the resource-instance-name and the model name
+ if (relationShipList != null) {
+ relationShipList.each {
+ if (StringUtils.containsIgnoreCase(it.resourceType, resource.getModelInfo().getModelName())) {
+ resource.setResourceId(it.resourceInstanceId);
+ }
+ }
+ }
+ }
+ execution.setVariable("deleteResourceList", deleteResourceList)
+ utils.log("DEBUG", "delete resource list : " + deleteResourceList, isDebugEnabled)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ utils.log("DEBUG", " ***** exit processDecomposition() of delete generic e2e service flow ***** ", isDebugEnabled)
+ }
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = execution.getVariable("operationType")
+ String resourceTemplateUUIDs = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service creation"
+ utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+ List<Resource> deleteResourceList = execution.getVariable("deleteResourceList")
+
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ for(Resource resource : deleteResourceList){
+ resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
+ }
+
+
+ execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
+ utils.logAudit("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch(Exception e){
+ 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)
+ }
+
+ /**
+ * post config request.
+ */
+ public void postConfigRequest(execution){
+ //to do
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
new file mode 100644
index 0000000000..3ee059cb02
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -0,0 +1,1077 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse;
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.springframework.web.util.UriUtils
+
+import groovy.json.*
+
+public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteNetworkInstance.class);
+
+ String Prefix= "DELNWKI_"
+ String groovyClassName = "DoDeleteNetworkInstance"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "networkRequest", "")
+ execution.setVariable(Prefix + "isSilentSuccess", false)
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "requestId", "")
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "lcpCloudRegion", "")
+ execution.setVariable(Prefix + "networkInputs", "")
+ execution.setVariable(Prefix + "tenantId", "")
+
+ execution.setVariable(Prefix + "queryAAIRequest","")
+ execution.setVariable(Prefix + "queryAAIResponse", "")
+ execution.setVariable(Prefix + "aaiReturnCode", "")
+ execution.setVariable(Prefix + "isAAIGood", false)
+ execution.setVariable(Prefix + "isVfRelationshipExist", false)
+
+ // AAI query Cloud Region
+ execution.setVariable(Prefix + "queryCloudRegionRequest","")
+ execution.setVariable(Prefix + "queryCloudRegionReturnCode","")
+ execution.setVariable(Prefix + "queryCloudRegionResponse","")
+ execution.setVariable(Prefix + "cloudRegionPo","")
+ execution.setVariable(Prefix + "cloudRegionSdnc","")
+
+ execution.setVariable(Prefix + "deleteNetworkRequest", "")
+ execution.setVariable(Prefix + "deleteNetworkResponse", "")
+ execution.setVariable(Prefix + "networkReturnCode", "")
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+
+ execution.setVariable(Prefix + "deleteSDNCRequest", "")
+ execution.setVariable(Prefix + "deleteSDNCResponse", "")
+ execution.setVariable(Prefix + "sdncReturnCode", "")
+ execution.setVariable(Prefix + "sdncResponseSuccess", false)
+
+ execution.setVariable(Prefix + "deactivateSDNCRequest", "")
+ execution.setVariable(Prefix + "deactivateSDNCResponse", "")
+ execution.setVariable(Prefix + "deactivateSdncReturnCode", "")
+ execution.setVariable(Prefix + "isSdncDeactivateRollbackNeeded", "")
+
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", "")
+ execution.setVariable(Prefix + "isException", false)
+
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of " + groovyClassName + " Request ")
+
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ try {
+ // get incoming message/input
+ execution.setVariable("action", "DELETE")
+ String deleteNetwork = execution.getVariable("bpmnRequest")
+ if (deleteNetwork != null) {
+ if (deleteNetwork.contains("requestDetails")) {
+ // JSON format request is sent, create xml
+ try {
+ def prettyJson = JsonOutput.prettyPrint(deleteNetwork.toString())
+ msoLogger.debug(" Incoming message formatted . . . : " + '\n' + prettyJson)
+ deleteNetwork = vidUtils.createXmlNetworkRequestInfra(execution, deleteNetwork)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ } else {
+ // XML format request is sent
+
+ }
+ } else {
+ // vIPR format request is sent, create xml from individual variables
+ deleteNetwork = vidUtils.createXmlNetworkRequestInstance(execution)
+ }
+
+ deleteNetwork = utils.formatXml(deleteNetwork)
+ msoLogger.debug(deleteNetwork)
+ execution.setVariable(Prefix + "networkRequest", deleteNetwork)
+ msoLogger.debug(Prefix + "networkRequest - " + '\n' + deleteNetwork)
+
+ // validate 'backout-on-failure' to override 'mso.rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, deleteNetwork)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ msoLogger.debug(Prefix + "rollbackEnabled - " + rollbackEnabled)
+
+ String networkInputs = utils.getNodeXml(deleteNetwork, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable(Prefix + "networkInputs", networkInputs)
+
+ // prepare messageId
+ String messageId = execution.getVariable("testMessageId") // for testing
+ if (messageId == null || messageId == "") {
+ messageId = UUID.randomUUID()
+ msoLogger.debug(Prefix + "messageId, random generated: " + messageId)
+ } else {
+ msoLogger.debug(Prefix + "messageId, pre-assigned: " + messageId)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText(deleteNetwork, "source")
+ execution.setVariable(Prefix + "source", source)
+ msoLogger.debug(Prefix + "source - " + source)
+
+ String networkId = ""
+ if (utils.nodeExists(networkInputs, "network-id")) {
+ networkId = utils.getNodeText(networkInputs, "network-id")
+ if (networkId == null || networkId == "" || networkId == 'null' ) {
+ sendSyncError(execution)
+ // missing value of network-id
+ String dataErrorMessage = "network-request has missing 'network-id' element/value."
+ msoLogger.debug(" Invalid Request - " + dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ }
+
+ // lcpCloudRegion or tenantId not sent, will be extracted from query AA&I
+ def lcpCloudRegion = null
+ if (utils.nodeExists(networkInputs, "aic-cloud-region")) {
+ lcpCloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ if (lcpCloudRegion == 'null') {
+ lcpCloudRegion = null
+ }
+ }
+ execution.setVariable(Prefix + "lcpCloudRegion", lcpCloudRegion)
+ msoLogger.debug("lcpCloudRegion : " + lcpCloudRegion)
+
+ String tenantId = null
+ if (utils.nodeExists(networkInputs, "tenant-id")) {
+ tenantId = utils.getNodeText(networkInputs, "tenant-id")
+ if (tenantId == 'null') {
+ tenantId = null
+ }
+
+ }
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ msoLogger.debug("tenantId : " + tenantId)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion? : " + sdncVersion)
+
+ // 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 dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ msoLogger.debug(dataErrorMessage )
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTQueryAAI (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAI() of DoDoDeleteNetworkInstance ***** " )
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkId = utils.getNodeText(networkInputs, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+ msoLogger.debug(queryAAIRequest)
+ execution.setVariable(Prefix + "queryAAIRequest", queryAAIRequest)
+ msoLogger.debug(Prefix + "AAIRequest - " + "\n" + queryAAIRequest)
+
+ RESTConfig config = new RESTConfig(queryAAIRequest);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ Boolean isVfRelationshipExist = false
+ try {
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiReturnCode", returnCode)
+
+ msoLogger.debug(" ***** AAI Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ execution.setVariable(Prefix + "queryAAIResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode=='204') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIGood", true)
+ msoLogger.debug(" AAI Query Success REST Response - " + "\n" + aaiResponseAsString)
+ // verify if vf or vnf relationship exist
+ if (utils.nodeExists(aaiResponseAsString, "relationship")) {
+ NetworkUtils networkUtils = new NetworkUtils()
+ isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
+ execution.setVariable(Prefix + "isVfRelationshipExist", isVfRelationshipExist)
+ if (isVfRelationshipExist == true) {
+ String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
+ exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
+
+ } else {
+ // verify if lcpCloudRegion was sent as input, if not get value from AAI Response
+ if (execution.getVariable(Prefix + "lcpCloudRegion") == null ) {
+ String lcpCloudRegion = networkUtils.getCloudRegion(aaiResponseAsString)
+ execution.setVariable(Prefix + "lcpCloudRegion", lcpCloudRegion)
+ msoLogger.debug(" Get AAI getCloudRegion() : " + lcpCloudRegion)
+ }
+ if (execution.getVariable(Prefix + "tenantId") == null ) {
+ String tenantId = networkUtils.getTenantId(aaiResponseAsString)
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ msoLogger.debug(" Get AAI getTenantId() : " + tenantId)
+ }
+
+ }
+ }
+ msoLogger.debug(Prefix + "isVfRelationshipExist - " + isVfRelationshipExist)
+
+ } else {
+ execution.setVariable(Prefix + "isAAIGood", false)
+ if (returnCode=='404' || aaiResponseAsString == "" || aaiResponseAsString == null) {
+ // not found // empty aai response
+ execution.setVariable(Prefix + "isSilentSuccess", true)
+ msoLogger.debug(" AAI Query is Silent Success")
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Error Response from callRESTQueryAAI() - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ msoLogger.debug(" AAI Query call, isAAIGood? : " + execution.getVariable(Prefix + "isAAIGood"))
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, callRESTQueryAAI() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAICloudRegion of DoDeleteNetworkInstance ***** " )
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ // String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ String cloudRegion = execution.getVariable(Prefix + "lcpCloudRegion")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ msoLogger.debug(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug(Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
+
+ if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+ execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo)
+ execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode")
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, callRESTQueryAAICloudRegion(). Unexpected Response from AAI - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareNetworkRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareNetworkRequest of DoDeleteNetworkInstance ")
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String cloudSiteId = execution.getVariable(Prefix + "cloudRegionPo")
+ String tenantId = execution.getVariable(Prefix + "tenantId")
+
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+ String networkType = utils.getNodeText(queryAAIResponse, "network-type")
+ String networkId = utils.getNodeText(queryAAIResponse, "network-id")
+ String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
+
+ String networkStackId = ""
+ networkStackId = utils.getNodeText(queryAAIResponse, "heat-stack-id")
+ if (networkStackId == 'null' || networkStackId == "" || networkStackId == null) {
+ networkStackId = "force_delete"
+ }
+
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // Added new Elements
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String notificationUrl = "" //TODO - is this coming from URN? What variable/value to use?
+ //String notificationUrl = execution.getVariable("URN_?????") //TODO - is this coming from URN? What variable/value to use?
+
+ String modelCustomizationUuid = ""
+ if (utils.nodeExists(networkRequest, "networkModelInfo")) {
+ String networkModelInfo = utils.getNodeXml(networkRequest, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
+ modelCustomizationUuid = utils.getNodeText(networkModelInfo, "modelCustomizationUuid")
+ } else {
+ modelCustomizationUuid = utils.getNodeText(networkRequest, "modelCustomizationId")
+ }
+
+ String deleteNetworkRequest = """
+ <deleteNetworkRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <networkId>${MsoUtils.xmlEscape(networkId)}</networkId>
+ <networkStackId>${MsoUtils.xmlEscape(networkStackId)}</networkStackId>
+ <networkType>${MsoUtils.xmlEscape(networkType)}</networkType>
+ <modelCustomizationUuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteNetworkRequest>
+ """.trim()
+
+ msoLogger.debug(Prefix + "deleteNetworkRequest - " + "\n" + deleteNetworkRequest)
+ // Format Response
+ String buildDeleteNetworkRequestAsString = utils.formatXml(deleteNetworkRequest)
+ msoLogger.debug(buildDeleteNetworkRequestAsString)
+ msoLogger.debug(Prefix + "deleteNetworkRequestAsString - " + "\n" + buildDeleteNetworkRequestAsString)
+
+ String restURL = UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)
+ execution.setVariable("mso.adapters.network.rest.endpoint", restURL + "/" + networkId)
+ msoLogger.debug("mso.adapters.network.rest.endpoint - " + "\n" + restURL + "/" + networkId)
+
+ execution.setVariable(Prefix + "deleteNetworkRequest", buildDeleteNetworkRequestAsString)
+ msoLogger.debug(Prefix + "deleteNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString)
+ }
+ catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareNetworkRequest(). Unexpected Response from AAI - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ /**
+ * This method is used instead of an HTTP Connector task because the
+ * connector does not allow DELETE with a body.
+ */
+ public void sendRequestToVnfAdapter(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+
+ String vnfAdapterUrl = UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint",execution)
+ String vnfAdapterRequest = execution.getVariable(Prefix + "deleteNetworkRequest")
+
+ RESTConfig config = new RESTConfig(vnfAdapterUrl)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/xml").
+ addAuthorizationHeader(execution.getVariable("BasicAuthHeaderValuePO"));
+
+ APIResponse response;
+
+ response = client.httpDelete(vnfAdapterRequest)
+
+ execution.setVariable(Prefix + "networkReturnCode", response.getStatusCode())
+ execution.setVariable(Prefix + "deleteNetworkResponse", response.getResponseBodyAsString())
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, sendRequestToVnfAdapter() - " + ex.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, exceptionMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+
+ public void prepareSDNCRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareSDNCRequest of DoDeleteNetworkInstance ")
+
+ try {
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+ msoLogger.debug(Prefix + "requestId " + requestId)
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "delete", "DisconnectNetworkRequest", cloudRegionId, networkId, queryAAIResponse, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ msoLogger.debug(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, exceptionMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCRequest of DoDeleteNetworkInstance ")
+
+ try {
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "unassign", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ msoLogger.debug(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, exceptionMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void prepareRpcSDNCDeactivate(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCDeactivate() of DoDeleteNetworkInstance ")
+
+ try {
+
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "deactivate", "DeleteNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "deactivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ msoLogger.debug(" Preparing request for RPC SDNC Topology deactivate - " + "\n" + sndcTopologyRollbackRpcRequestAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateNetworkResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside validateNetworkResponse of DoDeleteNetworkInstance ")
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "deleteNetworkResponse")
+
+ msoLogger.debug(" Network Adapter responseCode: " + returnCode)
+ msoLogger.debug("Network Adapter Response - " + "\n" + networkResponse)
+ msoLogger.debug(networkResponse)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ msoLogger.debug(" Network Adapter Response is successful - " + "\n" + networkResponse)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ if ((rollbackData == null) || (rollbackData.isEmpty())) {
+ msoLogger.debug(" Network Adapter 'rollback' data is not Sent: " + "\n" + networkResponse)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ } else {
+ String rollbackNetwork =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ ${rollbackData}
+ </NetworkAdapter:rollbackNetwork>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ msoLogger.debug(" Network Adapter rollback data - " + "\n" + rollbackNetworkXml)
+ }
+
+
+ } else { // network error
+ if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx
+ if (networkResponse.contains("deleteNetworkError") ) {
+ networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+ errorMessage = utils.getNodeText(networkResponse, "message")
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ } else { // CatchAll exception
+ if (returnCode == "500") {
+ errorMessage = "JBWEB000065: HTTP Status 500."
+ } else {
+ errorMessage = "Return code is " + returnCode
+ }
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ }
+
+ } else { // CatchAll exception
+ String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, validateNetworkResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateSDNCResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside validateSDNCResponse of DoDeleteNetworkInstance ")
+
+ String response = execution.getVariable(Prefix + "deleteSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String deleteSDNCResponseDecodeXml = execution.getVariable(Prefix + "deleteSDNCResponse")
+ deleteSDNCResponseDecodeXml = deleteSDNCResponseDecodeXml.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "deleteSDNCResponse", deleteSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", true) //
+ execution.setVariable(Prefix + "isPONR", true)
+ msoLogger.debug("Successfully Validated SDNC Response")
+ } else {
+ msoLogger.debug("Did NOT Successfully Validated SDNC Response")
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCDeactivateResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateRpcSDNCDeactivateResponse() of DoDeleteNetworkInstance ")
+
+ String response = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "deactivateSDNCResponse", assignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, Prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncDeactivateRollbackNeeded", true)
+ msoLogger.debug("Successfully Validated Rpc SDNC Activate Response")
+
+ } else {
+ msoLogger.debug("Did NOT Successfully Validated Rpc SDNC Deactivate Response")
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void prepareRpcSDNCDeactivateRollback(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCDeactivateRollback() of DoDeleteNetworkInstance ")
+
+ try {
+
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String deactivateSDNCResponse = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ String networkId = utils.getNodeText(deactivateSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "activate", "CreateNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ msoLogger.debug(" Preparing request for RPC SDNC Topology 'activate-CreateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCDeactivateRollback() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRollbackData() of DoDeleteNetworkInstance ")
+
+ try {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackDeactivateSDNCRequest = execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")
+ if (rollbackDeactivateSDNCRequest != null) {
+ if (rollbackDeactivateSDNCRequest != "") {
+ rollbackData.put("rollbackDeactivateSDNCRequest", execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest"))
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+ msoLogger.debug("** rollbackData : " + rollbackData)
+
+ execution.setVariable("WorkflowException", execution.getVariable("WorkflowException"))
+ msoLogger.debug("** WorkflowException : " + execution.getVariable("WorkflowException"))
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance 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 DoDeleteNetworkInstance ")
+
+ try {
+
+ msoLogger.debug(" ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"))
+ if (execution.getVariable(Prefix + "isException") == false) {
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable("WorkflowException", null)
+ if (execution.getVariable(Prefix + "isSilentSuccess") == true) {
+ execution.setVariable("rolledBack", false)
+ } else {
+ execution.setVariable("rolledBack", true)
+ }
+ prepareSuccessRollbackData(execution) // populate rollbackData
+
+ } else {
+ 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.
+ msoLogger.debug(" ***** workflowException: " + execution.getVariable("workflowException"))
+ WorkflowException wfex = execution.getVariable("workflowException")
+ exceptionMessage = wfex.getErrorMessage()
+ } else {
+ if (execution.getVariable(Prefix + "WorkflowException") != null) {
+ WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
+ exceptionMessage = pwfex.getErrorMessage()
+ } else {
+ if (execution.getVariable("WorkflowException") != null) {
+ WorkflowException pwfex = execution.getVariable("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) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, 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 DoDeleteNetworkInstance ")
+
+ try {
+
+ if (execution.getVariable("sdncVersion") != '1610') {
+ prepareRpcSDNCDeactivateRollback(execution)
+ prepareRpcSDNCUnassignRollback(execution)
+ } else {
+ prepareSDNCRollback(execution)
+ }
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ String rollbackDeactivateSDNCRequest = execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")
+ if (rollbackDeactivateSDNCRequest != null) {
+ if (rollbackDeactivateSDNCRequest != "") {
+ rollbackData.put("rollbackDeactivateSDNCRequest", execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest"))
+ }
+ }
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("** rollbackData : " + rollbackData)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCUnassignRollback(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareRpcSDNCUnassignRollbac() of DoDeleteNetworkInstance ")
+
+ try {
+
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String deleteSDNCResponse = execution.getVariable(Prefix + "deleteSDNCResponse")
+ String networkId = utils.getNodeText(deleteSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "assign", "CreateNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ msoLogger.debug(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(Prefix + "rollbackSDNCRequest" + "\n" + sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(" Preparing request for RPC SDNC Topology 'assign-CreateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCUnassignRollback() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRollback (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareSDNCRollback of DoDeleteNetworkInstance ")
+
+ try {
+
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText(deleteNetworkInput, "service-instance-id")
+
+ // get/set 'msoRequestId' and 'mso-request-id'
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ String queryAAIResponse = execution.getVariable(Prefix + "queryAAIResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "rollback", "DisconnectNetworkRequest", cloudRegionId, networkId, queryAAIResponse, null)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ msoLogger.debug(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(Prefix + "rollbackSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
+ msoLogger.debug(" Preparing request for RPC SDNC Topology 'rollback-DisconnectNetworkRequest' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString)
+
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRollback() - " + ex.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, exceptionMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(DelegateExecution execution){
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside setExceptionFlag() of DoDeleteNetworkInstance ")
+
+ 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 DoDeleteNetworkInstance 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")
+ msoLogger.debug("Started processJavaException Method")
+ msoLogger.debug("Variables List: " + execution.getVariables())
+ execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.debug("Completed processJavaException Method of " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..ca6e21eedc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
@@ -0,0 +1,338 @@
+/*-
+ * ============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 groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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 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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ *
+ */
+public class DoDeleteNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteNetworkInstanceRollback.class);
+
+ String Prefix="DELNWKIR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoDeleteNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "WorkflowException", null)
+
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", null)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", null)
+ execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoDeleteNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of " + className + ".groovy ")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request/variables
+ String rollbackDeactivateSDNCRequest = null
+ String rollbackSDNCRequest = null
+ String rollbackNetworkRequest = null
+
+ Map<String, String> rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData != null && rollbackData instanceof Map) {
+
+ if(rollbackData.containsKey("rollbackDeactivateSDNCRequest")) {
+ rollbackDeactivateSDNCRequest = rollbackData["rollbackDeactivateSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackSDNCRequest")) {
+ rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackNetworkRequest")) {
+ rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"]
+ }
+ }
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", rollbackDeactivateSDNCRequest)
+ msoLogger.debug("'rollbackData': " + '\n' + execution.getVariable("rollbackData"))
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion? : " + sdncVersion)
+
+ // 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()
+ msoLogger.debug(dataErrorMessage )
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ msoLogger.debug("*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"))
+ if(execution.getVariable(Prefix + "WorkflowException") != null) {
+ // called by: DoCreateNetworkInstance, partial rollback
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ } else {
+ // called by: Macro - Full Rollback, WorkflowException = null
+ execution.setVariable(Prefix + "fullRollback", true)
+
+ }
+
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+
+ } 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)
+
+ }
+
+ }
+
+ public void validateRollbackResponses (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateRollbackResponses() of DoDeleteNetworkInstanceRollback ")
+
+ try {
+
+ // validate SDNC activate response
+ String rollbackDeactivateSDNCMessages = ""
+ String rollbackDeactivateSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackDeactivateSDNCRequest") != null) {
+ rollbackDeactivateSDNCReturnCode = execution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")
+ String rollbackDeactivateSDNCResponse = execution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")
+ String rollbackDeactivateSDNCReturnInnerCode = ""
+ rollbackDeactivateSDNCResponse = rollbackDeactivateSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackDeactivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackDeactivateSDNCResponse, "response-code")) {
+ rollbackDeactivateSDNCReturnInnerCode = utils.getNodeText(rollbackDeactivateSDNCResponse, "response-code")
+ if (rollbackDeactivateSDNCReturnInnerCode == "200" || rollbackDeactivateSDNCReturnInnerCode == "" || rollbackDeactivateSDNCReturnInnerCode == "0") {
+ rollbackDeactivateSDNCMessages = " + SNDC deactivate rollback completed."
+ } else {
+ rollbackDeactivateSDNCMessages = " + SDNC deactivate rollback failed. "
+ }
+ } else {
+ rollbackDeactivateSDNCMessages = " + SNDC deactivate rollback completed."
+ }
+ } else {
+ rollbackDeactivateSDNCMessages = " + SDNC deactivate rollback failed. "
+ }
+ msoLogger.debug(" SDNC deactivate rollback Code - " + rollbackDeactivateSDNCReturnCode)
+ msoLogger.debug(" SDNC deactivate rollback Response - " + rollbackDeactivateSDNCResponse)
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ String rollbackSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) {
+ rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
+ String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
+ String rollbackSDNCReturnInnerCode = ""
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText(rollbackSDNCResponse, "response-code")
+ if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+ rollbackSdncErrorMessages = " + SNDC unassign rollback completed."
+ } else {
+ rollbackSdncErrorMessages = " + SDNC unassign rollback failed. "
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SNDC unassign rollback completed."
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SDNC unassign rollback failed. "
+ }
+ msoLogger.debug(" SDNC assign rollback Code - " + rollbackSDNCReturnCode)
+ msoLogger.debug(" SDNC assign rollback Response - " + rollbackSDNCResponse)
+ }
+
+ // validate PO network rollback response
+ String rollbackNetworkErrorMessages = ""
+ String rollbackNetworkReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) {
+ rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode")
+ String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse")
+ if (rollbackNetworkReturnCode != "200") {
+ rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+ } else {
+ rollbackNetworkErrorMessages = " + PO Network rollback completed."
+ }
+
+ msoLogger.debug(" NetworkRollback Code - " + rollbackNetworkReturnCode)
+ msoLogger.debug(" NetworkRollback Response - " + rollbackNetworkResponse)
+ }
+
+ String statusMessage = ""
+ int errorCode = 7000
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+ if (execution.getVariable(Prefix + "fullRollback") == false) {
+ WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException") // original WorkflowException
+ if (wfe != null) {
+ statusMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ errorCode = '7000'
+ }
+
+ // set if all rolledbacks are successful
+ if (rollbackDeactivateSDNCReturnCode == "200" && rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rolledBack", true)
+ execution.setVariable("wasDeleted", true)
+
+ } else {
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("wasDeleted", true)
+ }
+
+ statusMessage = statusMessage + rollbackDeactivateSDNCMessages + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+ msoLogger.debug("Final DoDeleteNetworkInstanceRollback status message: " + statusMessage)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage);
+ execution.setVariable("workflowException", exception);
+
+ } else {
+ // rollback due to failures in Main flow (Macro or a-ala-carte) - Full rollback
+ if (rollbackDeactivateSDNCReturnCode == "200" && rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rollbackSuccessful", true)
+ execution.setVariable("rollbackError", false)
+ } else {
+ String exceptionMessage = "Network Delete Rollback was not Successful. "
+ msoLogger.debug(exceptionMessage)
+ execution.setVariable("rollbackSuccessful", false)
+ execution.setVariable("rollbackError", true)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ } catch (Exception ex) {
+ String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy
new file mode 100644
index 0000000000..f6dd0cad16
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy
@@ -0,0 +1,317 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.json.JSONArray;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.ServiceInstance
+import org.onap.so.bpmn.core.json.JsonUtils
+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.core.WorkflowException
+import org.onap.so.rest.APIResponse;
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+
+import java.util.List;
+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.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+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
+
+import com.fasterxml.jackson.jaxrs.json.annotation.JSONP.Def;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoDeleteResources.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * @param - delResourceList
+ * @param - serviceRelationShip
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoDeleteResources extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteResources.class);
+
+ String Prefix="DDELR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ msoLogger.trace("preProcessRequest ")
+ String msg = ""
+
+ List<ServiceInstance> realNSRessources = new ArrayList<ServiceInstance>()
+
+ // related ns from AAI
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List<String> nsSequence = new ArrayList<String>()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+ if (relationShipList != null) {
+ relationShipList.each {
+ String resourceType = it.resourceType
+ nsSequence.add(resourceType)
+ }
+ }
+
+ execution.setVariable("currentNSIndex", 0)
+ execution.setVariable("nsSequence", nsSequence)
+ execution.setVariable("realNSRessources", realNSRessources)
+ msoLogger.info("nsSequence: " + nsSequence)
+
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void getCurrentNS(execution){
+ msoLogger.trace("Start getCurrentNS Process ")
+
+ def currentIndex = execution.getVariable("currentNSIndex")
+ List<String> nsSequence = execution.getVariable("nsSequence")
+ String nsResourceType = nsSequence.get(currentIndex)
+
+ // GET AAI by Name, not ID, for process convenient
+ execution.setVariable("GENGS_type", "service-instance")
+ execution.setVariable("GENGS_serviceInstanceId", "")
+ execution.setVariable("GENGS_serviceInstanceName", nsResourceType)
+
+ msoLogger.trace("COMPLETED getCurrentNS Process ")
+ }
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ msoLogger.trace("postProcessAAIGET2 ")
+ String msg = ""
+
+ try {
+ String nsResourceName = execution.getVariable("GENGS_serviceInstanceName")
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(!succInAAI){
+ msoLogger.info("Error getting Service-instance from AAI in postProcessAAIGET", + nsResourceName)
+ 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)) {
+ String svcId = utils.getNodeText(aaiService, "service-instance-id")
+ //String mn = utils.getNodeText(aaiService, "model-name")
+ String mIuuid = utils.getNodeText(aaiService, "model-invariant-id")
+ String muuid = utils.getNodeText(aaiService, "model-version-id")
+ String mCuuid = utils.getNodeText(aaiService, "model-customization-uuid")
+ ServiceInstance rc = new ServiceInstance()
+ ModelInfo modelInfo = new ModelInfo()
+ //modelInfo.setModelName(mn)
+ modelInfo.setModelUuid(muuid)
+ modelInfo.setModelInvariantUuid(mIuuid)
+ modelInfo.getModelCustomizationUuid(mCuuid)
+ rc.setModelInfo(modelInfo)
+ rc.setInstanceId(svcId)
+ rc.setInstanceName(nsResourceName)
+
+ List<ServiceInstance> realNSRessources = execution.getVariable("realNSRessources")
+ realNSRessources.add(rc)
+ execution.setVariable("realNSRessources", realNSRessources)
+
+ msoLogger.info("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"))
+ }
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteResources.postProcessAAIGET " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIGET ")
+ }
+
+ public void parseNextNS(execution){
+ msoLogger.trace("Start parseNextNS Process ")
+ def currentIndex = execution.getVariable("currentNSIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentNSIndex", nextIndex)
+ List<String> nsSequence = execution.getVariable("nsSequence")
+ if(nextIndex >= nsSequence.size()){
+ execution.setVariable("allNsFinished", "true")
+ }else{
+ execution.setVariable("allNsFinished", "false")
+ }
+ msoLogger.trace("COMPLETED parseNextNS Process ")
+ }
+
+
+ public void sequenceResource(execution){
+ msoLogger.trace("STARTED sequenceResource Process ")
+ List<String> nsResources = new ArrayList<String>()
+ List<String> wanResources = new ArrayList<String>()
+ List<String> resourceSequence = new ArrayList<String>()
+
+ // get delete resource list and order list
+ List<Resource> delResourceList = execution.getVariable("delResourceList")
+ // existing resource list
+ List<ServiceInstance> existResourceList = execution.getVariable("realNSRessources")
+
+ for(ServiceInstance rc_e : existResourceList){
+
+ String muuid = rc_e.getModelInfo().getModelUuid()
+ String mIuuid = rc_e.getModelInfo().getModelInvariantUuid()
+ String mCuuid = rc_e.getModelInfo().getModelCustomizationUuid()
+ rcType = rc_e.getInstanceName()
+
+ for(Resource rc_d : delResourceList){
+
+ if(rc_d.getModelInfo().getModelUuid() == muuid
+ && rc_d.getModelInfo().getModelInvariantUuid() == mIuuid
+ && rc_d.getModelInfo().getModelCustomizationUuid() == mCuuid) {
+
+ if(StringUtils.containsIgnoreCase(rcType, "overlay")
+ || StringUtils.containsIgnoreCase(rcType, "underlay")){
+ wanResources.add(rcType)
+ }else{
+ nsResources.add(rcType)
+ }
+
+ }
+ }
+
+ }
+
+ resourceSequence.addAll(wanResources)
+ resourceSequence.addAll(nsResources)
+ String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("resourceSequence", resourceSequence)
+ msoLogger.info("resourceSequence: " + resourceSequence)
+ execution.setVariable("wanResources", wanResources)
+ msoLogger.trace("END sequenceResource Process ")
+ }
+
+ public void getCurrentResource(execution){
+ msoLogger.trace("Start getCurrentResoure Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ List<String> wanResources = execution.getVariable("wanResources")
+ String resourceName = resourceSequence.get(currentIndex)
+ execution.setVariable("resourceType",resourceName)
+ if(wanResources.contains(resourceName)){
+ execution.setVariable("controllerInfo", "SDN-C")
+ }else{
+ execution.setVariable("controllerInfo", "VF-C")
+ }
+ msoLogger.trace("COMPLETED getCurrentResoure Process ")
+ }
+
+ /**
+ * prepare delete parameters
+ */
+ public void preResourceDelete(execution, resourceName){
+
+ msoLogger.trace("STARTED preResourceDelete Process ")
+
+ List<ServiceInstance> existResourceList = execution.getVariable("realNSRessources")
+
+ for(ServiceInstance rc_e : existResourceList){
+
+ if(StringUtils.containsIgnoreCase(rc_e.getInstanceName(), resourceName)) {
+
+ String resourceInstanceUUID = rc_e.getInstanceId()
+ String resourceTemplateUUID = rc_e.getModelInfo().getModelUuid()
+ execution.setVariable("resourceInstanceId", resourceInstanceUUID)
+ execution.setVariable("resourceTemplateId", resourceTemplateUUID)
+ execution.setVariable("resourceType", resourceName)
+ msoLogger.info("Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " + resourceInstanceUUID + " resourceType: " + resourceName)
+ }
+ }
+
+ msoLogger.trace("END preResourceDelete Process ")
+ }
+
+ public void parseNextResource(execution){
+ msoLogger.trace("Start parseNextResource Process ")
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ if(nextIndex >= resourceSequence.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ msoLogger.trace("COMPLETED parseNextResource Process ")
+ }
+
+ /**
+ * post config request.
+ */
+ public void postConfigRequest(execution){
+ //to do
+ }
+
+}
+ \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
new file mode 100644
index 0000000000..a5a96f3bd3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -0,0 +1,400 @@
+
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+import org.apache.commons.lang3.StringUtils
+import org.apache.http.HttpResponse
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.json.JSONObject
+import org.onap.so.bpmn.common.recipe.BpmnRestClient
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.NetworkResource
+import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.properties.BPMNProperties
+import org.onap.so.logger.MsoLogger
+
+/**
+ * input for script :
+ * msoRequestId
+ * isDebugLogEnabled
+ * globalSubscriberId
+ * serviceType
+ * serviceInstanceId
+ * URN_mso_workflow_sdncadapter_callback
+ * serviceInputParams
+ * deleteResourceList
+ * resourceInstanceIDs
+ *
+ * output from script:
+ *
+ */
+
+public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteResourcesV1.class);
+
+ String Prefix="DDR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** preProcessRequest *****", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String serviceType = execution.getVariable("serviceType")
+ if (serviceType == null)
+ {
+ execution.setVariable("serviceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "URN_mso_workflow_sdncadapter_callback is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ StringBuilder sbParams = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
+ if (paramsMap != null)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sequenceResource(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED sequenceResource Process ======== ", isDebugEnabled)
+ List<Resource> sequencedResourceList = new ArrayList<Resource>()
+ List<Resource> wanResources = new ArrayList<Resource>()
+
+ // get delete resource list and order list
+ List<Resource> delResourceList = execution.getVariable("deleteResourceList")
+
+ def resourceSequence = BPMNProperties.getResourceSequenceProp()
+
+ if(resourceSequence != null) {
+ for (resourceType in resourceSequence.reverse()) {
+ for (resource in delResourceList) {
+ if (StringUtils.containsIgnoreCase(resource.getModelInfo().getModelName(), resourceType)) {
+ sequencedResourceList.add(resource)
+
+ if (resource instanceof NetworkResource) {
+ wanResources.add(resource)
+ }
+ }
+ }
+ }
+ }else {
+ //define sequenced resource list, we deploy vf first and then network and then ar
+ //this is defaule sequence
+ List<VnfResource> vnfResourceList = new ArrayList<VnfResource>()
+ List<AllottedResource> arResourceList = new ArrayList<AllottedResource>()
+ for (Resource rc : delResourceList) {
+ if (rc instanceof VnfResource) {
+ vnfResourceList.add(rc)
+ } else if (rc instanceof NetworkResource) {
+ wanResources.add(rc)
+ } else if (rc instanceof AllottedResource) {
+ arResourceList.add(rc)
+ }
+ }
+
+ sequencedResourceList.addAll(arResourceList)
+ sequencedResourceList.addAll(wanResources)
+ sequencedResourceList.addAll(vnfResourceList)
+ }
+
+ String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("sequencedResourceList", sequencedResourceList)
+ utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled)
+ utils.log("INFO", " ======== END sequenceResource Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * prepare delete parameters
+ */
+ public void preResourceDelete(DelegateExecution execution){
+
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED preResourceDelete Process ======== ", isDebugEnabled)
+
+ List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
+
+ int currentIndex = execution.getVariable("currentResourceIndex")
+ Resource curResource = sequencedResourceList.get(currentIndex);
+
+ String resourceInstanceUUID = curResource.getResourceId()
+ String resourceTemplateUUID = curResource.getModelInfo().getModelUuid()
+ execution.setVariable("resourceInstanceId", resourceInstanceUUID)
+ execution.setVariable("currentResource", curResource)
+ utils.log("INFO", "Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: "
+ + resourceInstanceUUID + " resourceModelName: " + curResource.getModelInfo().getModelName(), isDebugEnabled)
+
+ utils.log("INFO", " ======== END preResourceDelete Process ======== ", isDebugEnabled)
+ }
+
+
+ /**
+ * Execute delete workflow for resource
+ */
+ public void executeResourceDelete(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start executeResourceDelete Process ======== ", isDebugEnabled)
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceType = execution.getVariable("serviceType")
+
+ String resourceInstanceId = execution.getVariable("resourceInstanceId")
+
+ Resource currentResource = execution.getVariable("currentResource")
+ String action = "deleteInstance"
+ JSONObject resourceRecipe = cutils.getResourceRecipe(execution, currentResource.getModelInfo().getModelUuid(), action)
+ String recipeUri = resourceRecipe.getString("orchestrationUri")
+ int recipeTimeout = resourceRecipe.getInt("recipeTimeout")
+ String recipeParamXsd = resourceRecipe.get("paramXSD")
+
+
+ ResourceInput resourceInput = new ResourceInput();
+ resourceInput.setServiceInstanceId(serviceInstanceId)
+ resourceInput.setResourceInstanceName(currentResource.getResourceInstanceName())
+ resourceInput.setResourceInstancenUuid(currentResource.getResourceId())
+ resourceInput.setOperationId(execution.getVariable("operationId"))
+ resourceInput.setOperationType(execution.getVariable("operationType"))
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ resourceInput.setGlobalSubscriberId(globalSubscriberId)
+ resourceInput.setResourceModelInfo(currentResource.getModelInfo());
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
+ resourceInput.setServiceType(serviceType)
+
+ String recipeURL = BPMNProperties.getProperty("bpelURL", "http://mso:8080") + recipeUri
+
+ HttpResponse resp = BpmnRestClient.post(recipeURL, requestId, recipeTimeout, action, serviceInstanceId, serviceType, resourceInput.toString(), recipeParamXsd)
+ utils.log("INFO", " ======== END executeResourceDelete Process ======== ", isDebugEnabled)
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Error occured within DoDeleteResourcesV1 executeResourceDelete method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured during DoDeleteResourcesV1 executeResourceDelete Catalog")
+ }
+ }
+
+
+ public void parseNextResource(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start parseNextResource Process ======== ", isDebugEnabled)
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> sequencedResourceList = execution.getVariable("sequencedResourceList")
+ if(nextIndex >= sequencedResourceList.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled)
+ }
+
+ public void prepareFinishedProgressForResource(DelegateExecution execution) {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceType = execution.getVariable("serviceType")
+ String resourceInstanceId = execution.getVariable("resourceInstanceId")
+ Resource currentResource = execution.getVariable("currentResource")
+ String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid()
+ String resourceModelName = currentResource.getModelInfo().getModelName()
+ String operationType = execution.getVariable("operationType")
+ String progress = "100"
+ String status = "finished"
+ String statusDescription = "The resource instance does not exist for " + resourceModelName
+ String operationId = execution.getVariable("operationId")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${MsoUtils.xmlEscape(operationType)}</operType>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <resourceTemplateUUID>${MsoUtils.xmlEscape(resourceCustomizationUuid)}</resourceTemplateUUID>
+ <serviceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceId>
+ <status>${MsoUtils.xmlEscape(status)}</status>
+ <statusDescription>${MsoUtils.xmlEscape(statusDescription)}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>""";
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ execution.setVariable("CVFMI_updateResOperStatusRequest", body)
+ }
+
+ public void prepareSDNCServiceDeactivateRequest (DelegateExecution execution) {
+ prepareSDNCServiceRequest (execution, "deactivate")
+ }
+
+ public void prepareSDNCServiceDeleteRequest (DelegateExecution execution) {
+ prepareSDNCServiceRequest (execution, "delete")
+ }
+
+ public void prepareSDNCServiceRequest (DelegateExecution execution, String svcAction) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** Started prepareSDNCServiceRequest for " + svcAction + "*****", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdnc_svcAction = svcAction
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String hdrRequestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String source = execution.getVariable("source")
+ String sdnc_service_id = serviceInstanceId
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String serviceType = execution.getVariable("serviceType")
+ String globalCustomerId = execution.getVariable("globalSubscriberId")
+ String serviceModelInvariantUuid = serviceDecomposition.getModelInfo().getModelInvariantUuid()
+ String serviceModelUuid = serviceDecomposition.getModelInfo().getModelUuid()
+ String serviceModelVersion = serviceDecomposition.getModelInfo().getModelVersion()
+ String serviceModelName = serviceDecomposition.getModelInfo().getModelName()
+
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String 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>service-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>DeleteServiceInstance</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>
+ <service-request-input>
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("INFO","sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteResourcesV1 flow. prepareSDNCServiceRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ utils.log("INFO","***** Exit prepareSDNCServiceRequest for " + svcAction + "*****", isDebugEnabled)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
new file mode 100644
index 0000000000..198144ad34
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -0,0 +1,472 @@
+/*-
+ * ============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 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.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.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.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.*
+
+/**
+ * This groovy class supports the <class>DoDeleteServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName - O
+ * @param - serviceModelInfo - O
+ * @param - productFamilyId
+ * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
+ * @param - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteServiceInstance.class);
+
+ String Prefix="DDELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ msoLogger.trace("preProcessRequest ")
+ String msg = ""
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",Prefix)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ if (globalSubscriberId == null)
+ {
+ execution.setVariable("globalSubscriberId", "")
+ }
+
+ //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ if (subscriptionServiceType == null)
+ {
+ execution.setVariable("subscriptionServiceType", "")
+ }
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable('mso.workflow.sdncadapter.callback',execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "mso.workflow.sdncadapter.callback is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ StringBuilder sbParams = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
+ if (paramsMap != null)
+ {
+ sbParams.append("<service-input-parameters>")
+ for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+ String paramsXml
+ String paramName = entry.getKey()
+ String paramValue = entry.getValue()
+ paramsXml =
+ """ <param>
+ <name>${MsoUtils.xmlEscape(paramName)}</name>
+ <value>${MsoUtils.xmlEscape(paramValue)}</value>
+ </param>
+ """
+ sbParams.append(paramsXml)
+ }
+ sbParams.append("</service-input-parameters>")
+ }
+ String siParamsXml = sbParams.toString()
+ if (siParamsXml == null)
+ siParamsXml = ""
+ execution.setVariable("siParamsXml", siParamsXml)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void preProcessSDNCDelete (DelegateExecution execution) {
+
+ msoLogger.trace("preProcessSDNCDelete ")
+ String msg = ""
+
+ try {
+ def serviceInstanceId = execution.getVariable("serviceInstanceId") ?: ""
+ def serviceInstanceName = execution.getVariable("serviceInstanceName") ?: ""
+ def callbackURL = execution.getVariable("sdncCallbackUrl") ?: ""
+ def requestId = execution.getVariable("msoRequestId") ?: ""
+ def serviceId = execution.getVariable("productFamilyId") ?: ""
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType") ?: ""
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") ?: "" //globalCustomerId
+
+ String serviceModelInfo = execution.getVariable("serviceModelInfo") ?: ""
+ def modelInvariantUuid = ""
+ def modelVersion = ""
+ def modelUuid = ""
+ def modelName = ""
+ if (!isBlank(serviceModelInfo))
+ {
+ modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid") ?: ""
+ modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion") ?: ""
+ modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid") ?: ""
+ modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName") ?: ""
+
+ }
+
+ def siParamsXml = execution.getVariable("siParamsXml") ?: ""
+ def msoAction = ""
+ // special URL for SDNW, msoAction helps set diff url in SDNCA
+ if("TRANSPORT".equalsIgnoreCase(execution.getVariable("serviceType")))
+ {
+ msoAction = "TRANSPORT"
+ }
+
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ String sdncDelete =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${MsoUtils.xmlEscape(msoAction)}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>DeleteServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-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>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ ${siParamsXml}
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ sdncDelete = utils.formatXml(sdncDelete)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ execution.setVariable("sdncDelete", sdncDelete)
+ execution.setVariable("sdncDeactivate", sdncDeactivate)
+ msoLogger.debug("sdncDeactivate:\n" + sdncDeactivate)
+ msoLogger.debug("sdncDelete:\n" + sdncDelete)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ msoLogger.debug(" *****Exit preProcessSDNCDelete *****")
+ }
+
+ public void postProcessSDNCDelete(DelegateExecution execution, String response, String method) {
+
+
+ msoLogger.trace("postProcessSDNC " + method + " ")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Good response from SDNC Adapter for service-instance " + method + "response:\n" + response)
+
+ }else{
+ msg = "Bad Response from SDNC Adapter for service-instance " + method
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNC " + method + " Exception:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessSDNC " + method + " ")
+ }
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+
+ msoLogger.trace("postProcessAAIGET ")
+ String msg = ""
+
+ 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)
+ }
+ 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)
+ }
+ }
+
+ 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")
+ 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")
+ }
+ }
+ }
+ }
+
+ if ("TRANSPORT".equalsIgnoreCase(serviceType))
+ {
+ if ("PendingDelete".equals(orchestrationStatus))
+ {
+ execution.setVariable("skipDeactivate", true)
+ }
+ 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)){
+ 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(!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{
+ 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")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIGET ")
+ }
+
+ /**
+ * Deletes the service instance in aai
+ */
+ public void deleteServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("Entered deleteServiceInstance")
+ try {
+ String globalCustId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("subscriptionServiceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient();
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+ resourceClient.delete(serviceInstanceUri)
+
+ msoLogger.trace("Exited deleteServiceInstance")
+ }catch(Exception e){
+ msoLogger.debug("Error occured within deleteServiceInstance method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during deleteServiceInstance from aai")
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
new file mode 100644
index 0000000000..0069bf4f0a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
@@ -0,0 +1,285 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - SO
+ * ================================================================================
+ * 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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+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.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>DoDeleteVFCNetworkServiceInstance.bpmn</class> process.
+ * flow for E2E ServiceInstance Delete
+ */
+public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVFCNetworkServiceInstance.class);
+
+
+ String vfcUrl = "/vfc/rest/v1/vfcadapter"
+
+ String host = "http://mso.mso.testlab.openecomp.org:8080"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("preProcessRequest() ")
+ try {
+ //deal with operation key
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ msoLogger.info("globalSubscriberId:" + globalSubscriberId)
+ String serviceType = execution.getVariable("serviceType")
+ msoLogger.info("serviceType:" + serviceType)
+ String serviceId = execution.getVariable("serviceId")
+ msoLogger.info("serviceId:" + serviceId)
+ String operationId = execution.getVariable("operationId")
+ msoLogger.info("serviceType:" + serviceType)
+ String nodeTemplateUUID = execution.getVariable("resourceTemplateId")
+ msoLogger.info("nodeTemplateUUID:" + nodeTemplateUUID)
+ String nsInstanceId = execution.getVariable("resourceInstanceId")
+ msoLogger.info("nsInstanceId:" + nsInstanceId)
+ execution.setVariable("nsInstanceId",nsInstanceId)
+ String nsOperationKey = """{
+ "globalSubscriberId":"${globalSubscriberId}",
+ "serviceType":"${serviceType}",
+ "serviceId":"${serviceId}",
+ "operationId":"${operationId}",
+ "nodeTemplateUUID":"${nodeTemplateUUID}"
+ }"""
+ execution.setVariable("nsOperationKey", nsOperationKey);
+ msoLogger.info("nsOperationKey:" + nsOperationKey)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ /**
+ * unwind NS from AAI relationship
+ */
+ public void deleteNSRelationship(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** deleteNSRelationship *****", isDebugEnabled)
+ String nsInstanceId = execution.getVariable("resourceInstanceId")
+ if(nsInstanceId == null || nsInstanceId == ""){
+ utils.log("INFO"," Delete NS failed", isDebugEnabled)
+ return
+ }
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceId = execution.getVariable("serviceId")
+ String deleteRelationPayload = """<relationship xmlns="http://org.openecomp.aai.inventory/v11">
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(globalSubscriberId)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(serviceType)}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${MsoUtils.xmlEscape(nsInstanceId)}</relationship-value>
+ </relationship-data>
+ </relationship>"""
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ utils.log("INFO","Delete Relationship req:\n" + deleteRelationPayload, isDebugEnabled)
+ String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship"
+
+ APIResponse aaiRsp = executeAAIDeleteCall(execution, url, deleteRelationPayload)
+ utils.log("INFO","aai response status code:" + aaiRsp.getStatusCode(), isDebugEnabled)
+ utils.log("INFO","aai response content:" + aaiRsp.getResponseBodyAsString(), isDebugEnabled)
+ utils.log("INFO"," *****Exit deleteNSRelationship *****", isDebugEnabled)
+ }
+
+ public APIResponse executeAAIDeleteCall(DelegateExecution execution, String url, String payload){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
+ APIResponse apiResponse = null
+ try{
+ String uuid = utils.getRequestID()
+ utils.log("INFO","Generated uuid is: " + uuid, isDebugEnabled)
+ utils.log("INFO","URL to be used is: " + url, isDebugEnabled)
+ String userName = execution.getVariable("URN_aai_auth")
+ String password = execution.getVariable("URN_mso_msoKey")
+ String basicAuthCred = utils.getBasicAuth(userName,password)
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/xml").addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ apiResponse = client.httpDelete(payload)
+ utils.log("INFO","======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
+ }catch(Exception e){
+ utils.log("ERROR","Exception occured while executing AAI Put Call. Exception is: \n" + e, isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ /**
+ * delete NS task
+ */
+ public void deleteNetworkService(DelegateExecution execution) {
+
+ msoLogger.trace("deleteNetworkService start ")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String url = host + vfcUrl + "/ns/" + execution.getVariable("nsInstanceId")
+ APIResponse apiResponse = deleteRequest(execution, url, nsOperationKey)
+ String returnCode = apiResponse.getStatusCode()
+ String apiResponseAsString = apiResponse.getResponseBodyAsString()
+ String operationStatus = "error";
+ if(returnCode== "200" || returnCode== "202"){
+ operationStatus = "finished"
+ }
+ execution.setVariable("operationStatus", operationStatus)
+
+ msoLogger.trace("deleteNetworkService end ")
+ }
+
+ /**
+ * instantiate NS task
+ */
+ public void terminateNetworkService(DelegateExecution execution) {
+
+ msoLogger.trace("terminateNetworkService start ")
+ String nsOperationKey = execution.getVariable("nsOperationKey")
+ String url = host + vfcUrl + "/ns/" + execution.getVariable("nsInstanceId") + "/terminate"
+ APIResponse apiResponse = postRequest(execution, url, nsOperationKey)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String jobId = "";
+ if(returnCode== "200" || returnCode== "202"){
+ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
+ }
+ execution.setVariable("jobId", jobId)
+ msoLogger.trace("terminateNetworkService end ")
+ }
+
+ /**
+ * query NS task
+ */
+ public void queryNSProgress(DelegateExecution execution) {
+
+ msoLogger.trace("queryNSProgress start ")
+ String jobId = execution.getVariable("jobId")
+ String nsOperationKey = execution.getVariable("nsOperationKey");
+ String url = host + vfcUrl + "/jobs/" + execution.getVariable("jobId")
+ APIResponse apiResponse = postRequest(execution, url, nsOperationKey)
+ String returnCode = apiResponse.getStatusCode()
+ String apiResponseAsString = apiResponse.getResponseBodyAsString()
+ String operationProgress = "100"
+ if(returnCode== "200"){
+ operationProgress = jsonUtil.getJsonValue(apiResponseAsString, "responseDescriptor.progress")
+ }
+ execution.setVariable("operationProgress", operationProgress)
+ msoLogger.trace("queryNSProgress end ")
+ }
+
+ /**
+ * delay 5 sec
+ */
+ public void timeDelay(DelegateExecution execution) {
+ try {
+ Thread.sleep(5000);
+ } catch(InterruptedException e) {
+ msoLogger.info("Time Delay exception" + e)
+ }
+ }
+
+ /**
+ * finish NS task
+ */
+ public void finishNSDelete(DelegateExecution execution) {
+ //no need to do anything util now
+ }
+
+ /**
+ * post request
+ * url: the url of the request
+ * requestBody: the body of the request
+ */
+ private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){
+
+ msoLogger.trace("Started Execute VFC adapter Post Process ")
+ msoLogger.info("url:"+url +"\nrequestBody:"+ requestBody)
+ APIResponse apiResponse = null
+ try{
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Accept","application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk");;
+ apiResponse = client.httpPost(requestBody)
+ msoLogger.info("response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString())
+ msoLogger.trace("Completed Execute VF-C adapter Post Process ")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing VF-C Post Call. Exception is: \n" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+ /**
+ * delete request
+ * url: the url of the request
+ * requestBody: the body of the request
+ */
+ private APIResponse deleteRequest(DelegateExecution execution, String url, String requestBody){
+
+ msoLogger.trace("Started Execute VFC adapter Delete Process ")
+ msoLogger.info("url:"+url +"\nrequestBody:"+ requestBody)
+ APIResponse apiResponse = null
+ try{
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Accept","application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk");
+ apiResponse = client.httpDelete(requestBody)
+ msoLogger.info("response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString())
+ msoLogger.trace("Completed Execute VF-C adapter Delete Process ")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing VF-C Post Call. Exception is: \n" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
new file mode 100644
index 0000000000..b41b74e509
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -0,0 +1,711 @@
+/*-
+ * ============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 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.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.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VfModule
+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.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+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
+
+/* Subflow for Delete VF Module. When no DoDeleteVfModuleRequest is specified on input,
+ * functions as a building block subflow
+
+* Inputs for building block interface:
+* @param - requestId
+* @param - isDebugLogEnabled
+* @param - vnfId
+* @param - vfModuleId
+* @param - serviceInstanceId
+* @param - vfModuleName O
+* @param - vfModuleModelInfo
+* @param - cloudConfiguration*
+* @param - sdncVersion ("1610")
+* @param - retainResources
+* @param - aLaCarte
+*
+* Outputs:
+* @param - WorkflowException
+*
+*/
+public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVfModule.class);
+
+ def Prefix="DoDVfMod_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("DoDVfMod_contrailNetworkPolicyFqdnList", null)
+ execution.setVariable("DoDVfMod_oamManagementV4Address", null)
+ execution.setVariable("DoDVfMod_oamManagementV6Address", null)
+
+ }
+
+ // parse the incoming DELETE_VF_MODULE request for the Generic Vnf and Vf Module Ids
+ // and formulate the outgoing request for PrepareUpdateAAIVfModuleRequest
+ public void preProcessRequest(DelegateExecution execution) {
+
+ initProcessVariables(execution)
+
+ try {
+ def xml = execution.getVariable("DoDeleteVfModuleRequest")
+ String vnfId = ""
+ String vfModuleId = ""
+
+ if (xml == null || xml.isEmpty()) {
+ // Building Block-type request
+
+ // Set mso-request-id to request-id for VNF Adapter interface
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("tenantId", tenantId)
+ String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ // Source is HARDCODED
+ String source = "VID"
+ execution.setVariable("source", source)
+ // SrvInstId is hardcoded to empty
+ execution.setVariable("srvInstId", "")
+ // ServiceId is hardcoded to empty
+ execution.setVariable("serviceId", "")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ vnfId = execution.getVariable("vnfId")
+ vfModuleId = execution.getVariable("vfModuleId")
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", vfModuleId)
+ }
+ else {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceId)
+ }
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("vfModuleModelName", vfModuleModelName)
+ // retainResources
+ def retainResources = execution.getVariable("retainResources")
+ if (retainResources == null) {
+ retainResources = false
+ }
+ execution.setVariable("retainResources", retainResources)
+ }
+ else {
+
+ msoLogger.debug("DoDeleteVfModule Request: " + xml)
+
+ msoLogger.debug("input request xml: " + xml)
+
+ vnfId = utils.getNodeText(xml,"vnf-id")
+ execution.setVariable("vnfId", vnfId)
+ vfModuleId = utils.getNodeText(xml,"vf-module-id")
+ execution.setVariable("vfModuleId", vfModuleId)
+ def srvInstId = execution.getVariable("mso-service-instance-id")
+ execution.setVariable("srvInstId", srvInstId)
+ String requestId = ""
+ try {
+ requestId = execution.getVariable("mso-request-id")
+ } catch (Exception ex) {
+ requestId = utils.getNodeText(xml, "request-id")
+ }
+ execution.setVariable("requestId", requestId)
+ String source = utils.getNodeText(xml, "source")
+ execution.setVariable("source", source)
+ String serviceId = utils.getNodeText(xml, "service-id")
+ execution.setVariable("serviceId", serviceId)
+ String tenantId = utils.getNodeText(xml, "tenant-id")
+ execution.setVariable("tenantId", tenantId)
+
+ String serviceInstanceIdToSdnc = ""
+ if (xml.contains("service-instance-id")) {
+ serviceInstanceIdToSdnc = utils.getNodeText(xml, "service-instance-id")
+ } else {
+ serviceInstanceIdToSdnc = vfModuleId
+ }
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceIdToSdnc)
+ String vfModuleName = utils.getNodeText(xml, "vf-module-name")
+ execution.setVariable("vfModuleName", vfModuleName)
+ String vfModuleModelName = utils.getNodeText(xml, "vf-module-model-name")
+ execution.setVariable("vfModuleModelName", vfModuleModelName)
+ String cloudSiteId = utils.getNodeText(xml, "aic-cloud-region")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ }
+
+ // formulate the request for PrepareUpdateAAIVfModule
+ String request = """<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <orchestration-status>pending-delete</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>""" as String
+ msoLogger.debug("PrepareUpdateAAIVfModuleRequest :" + request)
+ msoLogger.debug("UpdateAAIVfModule Request: " + request)
+ execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+ execution.setVariable("vfModuleFromAAI", null)
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
+ }
+
+ // build a SDNC vnf-topology-operation request for the specified action
+ // (note: the action passed is expected to be 'changedelete' or 'delete')
+ public void prepSDNCAdapterRequest(DelegateExecution execution, String action) {
+
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("requestId") + "-" + System.currentTimeMillis()
+ }
+
+ def srvInstId = execution.getVariable("srvInstId")
+ def callbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String requestId = execution.getVariable("requestId")
+ String source = execution.getVariable("source")
+ String serviceId = execution.getVariable("serviceId")
+ String vnfId = execution.getVariable("vnfId")
+ String tenantId = execution.getVariable("tenantId")
+ String vfModuleId = execution.getVariable("vfModuleId")
+ String serviceInstanceIdToSdnc = execution.getVariable(Prefix + "serviceInstanceIdToSdnc")
+ String vfModuleName = execution.getVariable("vfModuleName")
+ // Get vfModuleName from AAI response if it was not specified on the request
+ if (vfModuleName == null || vfModuleName.isEmpty()) {
+ if (execution.getVariable("vfModuleFromAAI") != null) {
+ VfModule vfModuleFromAAI = execution.getVariable("vfModuleFromAAI")
+ vfModuleName = vfModuleFromAAI.getElementText("vf-module-name")
+ }
+ }
+ String vfModuleModelName = execution.getVariable("vfModuleModelName")
+ String cloudSiteId = execution.getVariable("cloudSiteId")
+ boolean retainResources = execution.getVariable("retainResources")
+ String requestSubActionString = ""
+ if (retainResources) {
+ requestSubActionString = "<request-sub-action>RetainResource</request-sub-action>"
+ }
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(vfModuleId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ ${requestSubActionString}
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceIdToSdnc)}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vfModuleId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vnf-type>
+ <vnf-name>${MsoUtils.xmlEscape(vfModuleName)}</vnf-name>
+ <generic-vnf-id>${MsoUtils.xmlEscape(vnfId)}</generic-vnf-id>
+ <generic-vnf-name></generic-vnf-name>
+ <generic-vnf-type></generic-vnf-type>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncAdapterWorkflowRequest: " + request)
+ msoLogger.debug("DoDeleteVfModule - SDNCAdapterWorkflowRequest: " + request)
+ execution.setVariable("sdncAdapterWorkflowRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing VnfAdapterDeleteV1 request
+ public void prepVNFAdapterRequest(DelegateExecution execution) {
+
+ def requestId = UUID.randomUUID().toString()
+ def origRequestId = execution.getVariable('requestId')
+ def srvInstId = execution.getVariable("serviceInstanceId")
+ def aicCloudRegion = execution.getVariable("cloudSiteId")
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ def vfModuleStackId = execution.getVariable('DoDVfMod_heatStackId')
+ def tenantId = execution.getVariable("tenantId")
+ def messageId = execution.getVariable('requestId') + '-' +
+ System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String request = """
+ <deleteVfModuleRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vfModuleStackId>${MsoUtils.xmlEscape(vfModuleStackId)}</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(origRequestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(srvInstId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteVfModuleRequest>
+ """ as String
+
+ msoLogger.debug("vnfAdapterRestV1Request: " + request)
+ msoLogger.debug("deleteVfModuleRequest: " + request)
+ execution.setVariable("vnfAdapterRestV1Request", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing UpdateAAIVfModuleRequest request
+ public void prepUpdateAAIVfModule(DelegateExecution execution) {
+
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<UpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <heat-stack-id>DELETE</heat-stack-id>
+ <orchestration-status>deleted</orchestration-status>
+ </UpdateAAIVfModuleRequest>""" as String
+ msoLogger.debug("UpdateAAIVfModuleRequest :" + request)
+ msoLogger.debug("UpdateAAIVfModuleRequest: " + request)
+ execution.setVariable("UpdateAAIVfModuleRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing DeleteAAIVfModuleRequest request
+ public void prepDeleteAAIVfModule(DelegateExecution execution) {
+
+
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<DeleteAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ </DeleteAAIVfModuleRequest>""" as String
+ msoLogger.debug("DeleteAAIVfModuleRequest :" + request)
+ msoLogger.debug("DeleteAAIVfModuleRequest: " + request)
+ execution.setVariable("DeleteAAIVfModuleRequest", request)
+ }
+
+ // generates a WorkflowException if
+ // -
+ public void handleDoDeleteVfModuleFailure(DelegateExecution execution) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "AAI error occurred deleting the Generic Vnf: " + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
+ execution.setVariable("WorkflowException", exception)
+ }
+
+ public void sdncValidateResponse(DelegateExecution execution, String response){
+
+ execution.setVariable("prefix",Prefix)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Successfully Validated SDNC Response")
+ }else{
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ public void postProcessVNFAdapterRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.trace("STARTED postProcessVNFAdapterRequest Process")
+
+ String vnfResponse = execution.getVariable("DoDVfMod_doDeleteVfModuleResponse")
+ msoLogger.debug("VNF Adapter Response is: " + vnfResponse)
+ msoLogger.debug("deleteVnfAResponse is: \n" + vnfResponse)
+
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("deleteVfModuleResponse")){
+ msoLogger.debug("Received a Good Response from VNF Adapter for DELETE_VF_MODULE Call.")
+ execution.setVariable("DoDVfMod_vnfVfModuleDeleteCompleted", true)
+
+ // Parse vnfOutputs for contrail network polcy FQDNs
+ if (vnfResponse.contains("vfModuleOutputs")) {
+ def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+ InputSource source = new InputSource(new StringReader(vfModuleOutputsXml));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document outputsXml = docBuilder.parse(source)
+
+ NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry")
+ List contrailNetworkPolicyFqdnList = []
+ for (int i = 0; i< entries.getLength(); i++) {
+ Node node = entries.item(i)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node
+ String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address)
+ execution.setVariable(Prefix + "oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ msoLogger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address)
+ execution.setVariable(Prefix + "oamManagementV6Address", oamManagementV6Address)
+ }
+
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ msoLogger.debug("Setting the fqdn list")
+ execution.setVariable("DoDVfMod_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ msoLogger.debug("Received a BAD Response from VNF Adapter for DELETE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ msoLogger.debug("Response from VNF Adapter is Null for DELETE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Internal Error Occured in PostProcess Method")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+ }
+ msoLogger.trace("COMPLETED postProcessVnfAdapterResponse Process")
+ }
+
+ public void deleteNetworkPoliciesFromAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED deleteNetworkPoliciesFromAAI ")
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ msoLogger.debug("No network policies to delete")
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable("DoDVfMod_networkPolicyFqdnCount", fqdnCount)
+ msoLogger.debug("DoDVfMod_networkPolicyFqdnCount - " + fqdnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+ msoLogger.debug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ msoLogger.debug("The return code is: " + returnCode)
+ // This network policy FQDN exists in AAI - need to delete it now
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable("DoDVfMod_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ msoLogger.debug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText(aaiResponseAsString, "network-policy-id")
+ msoLogger.debug("Deleting network-policy with network-policy-id " + networkPolicyId)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText(aaiResponseAsString, "resource-version")
+ msoLogger.debug("Deleting network-policy with resource-version " + resourceVersion)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+ msoLogger.debug("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+
+ msoLogger.debug("invoking DELETE call to AAI")
+ msoLogger.debug("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable("DoDVfMod_aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ msoLogger.debug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ msoLogger.debug("The return code from deleting network policy is: " + returnCodeDel)
+ // This network policy was deleted from AAI successfully
+ msoLogger.debug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ")
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ msoLogger.debug(delErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ msoLogger.debug("The return code is: " + returnCode)
+ msoLogger.debug("This network policy FQDN is not in AAI: " + fqdn)
+ msoLogger.debug("Network policy FQDN is not in AAI")
+ } 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 deleteNetworkPoliciesFromAAI - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ msoLogger.debug("No contrail network policies to query/create")
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoDeletVfModule flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+ def oamManagementV4Address = execution.getVariable(Prefix + 'oamManagementV4Address')
+ def oamManagementV6Address = execution.getVariable(Prefix + 'oamManagementV6Address')
+ def ipv4OamAddressElement = ''
+ def managementV6AddressElement = ''
+
+ if (oamManagementV4Address != null) {
+ ipv4OamAddressElement = '<ipv4-oam-address>' + 'DELETE' + '</ipv4-oam-address>'
+ }
+
+ if (oamManagementV6Address != null) {
+ managementV6AddressElement = '<management-v6-address>' + 'DELETE' + '</management-v6-address>'
+ }
+
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Using the vnfId and vfModuleId provided in the inputs,
+ * query AAI to get the corresponding VF Module info.
+ * A 200 response is expected with the VF Module info in the response body,
+ * Will determine VF Module's orchestration status if one exists
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModuleForStatus(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.queryAAIVfModuleForStatus(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ execution.setVariable(Prefix + 'orchestrationStatus', '')
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+ def vfModuleId = execution.getVariable('vfModuleId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint",execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") +
+ "/vf-modules/vf-module/" + UriUtils.encode(vfModuleId, "UTF-8")
+ msoLogger.debug("AAI endPoint: " + endPoint)
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+ APIResponse response = client.httpGet()
+ msoLogger.debug("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ msoLogger.debug("deleteVfModule - queryAAIVfModule Response: " + responseData)
+ msoLogger.debug("deleteVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable(Prefix + 'queryAAIVfModuleForStatusResponseCode', response.getStatusCode())
+ execution.setVariable(Prefix + 'queryAAIVfModuleForStatusResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ // Retrieve VF Module info and its orchestration status; if not found, do nothing
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find orchestration status')
+ if (responseData != null) {
+ def vfModuleText = utils.getNodeXml(responseData, "vf-module")
+ //def xmlVfModule= new XmlSlurper().parseText(vfModuleText)
+ def orchestrationStatus = utils.getNodeText(vfModuleText, "orchestration-status")
+ execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus)
+ msoLogger.debug("Received orchestration status from A&AI: " + orchestrationStatus)
+
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModuleForStatus(): ' + e.getMessage())
+ }
+ }
+
+
+
+
+
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
new file mode 100644
index 0000000000..1024fc57da
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
@@ -0,0 +1,609 @@
+/*-
+ * ============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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VfModule
+import org.onap.so.bpmn.common.scripts.VfModuleBase
+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.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+public class DoDeleteVfModuleFromVnf extends VfModuleBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVfModuleFromVnf.class);
+
+ def Prefix="DDVFMV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("DDVFMV_contrailNetworkPolicyFqdnList", null)
+ }
+
+ // parse the incoming request
+ public void preProcessRequest(DelegateExecution execution) {
+
+ initProcessVariables(execution)
+
+ try {
+
+ // Building Block-type request
+
+ // Set mso-request-id to request-id for VNF Adapter interface
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("mso-request-id", requestId)
+ execution.setVariable("requestId", requestId)
+ msoLogger.debug("msoRequestId: " + requestId)
+ String tenantId = execution.getVariable("tenantId")
+ msoLogger.debug("tenantId: " + tenantId)
+ String cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ msoLogger.debug("cloudSiteId: " + cloudSiteId)
+ // Source is HARDCODED
+ String source = "VID"
+ execution.setVariable("source", source)
+ // isVidRequest is hardcoded to "true"
+ execution.setVariable("isVidRequest", "true")
+ // SrvInstId is hardcoded to empty
+ execution.setVariable("srvInstId", "")
+ // ServiceId is hardcoded to empty
+ execution.setVariable("serviceId", "")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+ String vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("vnfId: " + vnfId)
+ String vfModuleId = execution.getVariable("vfModuleId")
+ msoLogger.debug("vfModuleId: " + vfModuleId)
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", vfModuleId)
+ }
+ else {
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceId)
+ }
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1707"
+ }
+ execution.setVariable(Prefix + "sdncVersion", sdncVersion)
+ msoLogger.debug("Incoming Sdnc Version is: " + sdncVersion)
+
+ String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
+
+
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Exception is: " + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
+ }
+
+ public void queryAAIForVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.queryAAIForVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+
+ msoLogger.debug("DoDeleteVfModuleFromVnf: AAI endPoint : " + endPoint)
+
+ try {
+ msoLogger.debug("DoDeleteVfModuleFromVnf: - invoking httpGet to AAI")
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('DDVMFV_getVnfResponseCode', response.getStatusCode())
+ execution.setVariable('DDVMFV_getVnfResponse', responseData)
+
+ msoLogger.debug("DoDeleteVfModuleFromVnf: AAI Response : " + responseData)
+ msoLogger.debug("DoDeleteVfModuleFromVnf: AAI ResponseCode : " + response.getStatusCode())
+
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ execution.setVariable('DDVMFV_getVnfResponseCode', 500)
+ execution.setVariable('DDVFMV_getVnfResponse', 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Validate the VF Module. That is, confirm that a VF Module with the input VF Module ID
+ * exists in the retrieved Generic VNF. Then, check to make sure that if that VF Module
+ * is the base VF Module and it's not the only VF Module for this Generic VNF, that we're not
+ * attempting to delete it.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void validateVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def genericVnf = execution.getVariable('DDVMFV_getVnfResponse')
+ def vnfId = execution.getVariable('_vnfId')
+ def vfModuleId = execution.getVariable('vfModuleId')
+ def VfModule vfModule = findVfModule(genericVnf, vfModuleId)
+ if (vfModule == null) {
+ def String msg = 'VF Module \'' + vfModuleId + '\' does not exist in Generic VNF \'' + vnfId + '\''
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, msg)
+ } else {
+
+ if (isDebugLogEnabled) {
+ msoLogger.debug('VF Module \'' + vfModuleId + '\': isBaseVfModule=' + vfModule.isBaseVfModule() + ', isOnlyVfModule=' + vfModule.isOnlyVfModule())
+ }
+ if (vfModule.isBaseVfModule() && !vfModule.isOnlyVfModule()) {
+ def String msg = 'Cannot delete VF Module \'' + vfModuleId +
+ '\'since it is the base VF Module and it\'s not the only VF Module in Generic VNF \'' + vnfId + '\''
+ msoLogger.debug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+
+ def heatStackId = vfModule.getElementText('heat-stack-id')
+ execution.setVariable('DDVMFV_heatStackId', heatStackId)
+ msoLogger.debug('VF Module heatStackId retrieved from AAI: ' + heatStackId)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in validateVfModule(): ' + e.getMessage())
+ }
+ }
+
+
+ public void preProcessSDNCDeactivateRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCDeactivateRequest ")
+
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ try{
+ //Build SDNC Request
+
+ String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate")
+
+ deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest)
+ execution.setVariable("DDVMFV_deactivateSDNCRequest", deactivateSDNCRequest)
+ msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
+
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCDeactivateRequest. Exception is:\n" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCDeactivateRequest ")
+ }
+
+ public void preProcessSDNCUnassignRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCUnassignRequest Process ")
+ try{
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign")
+
+ execution.setVariable("DDVMFV_unassignSDNCRequest", unassignSDNCRequest)
+ msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
+
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCUnassignRequest Process ")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("serviceId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ def source = execution.getVariable("source")
+ def vnfId = execution.getVariable("vnfId")
+
+ def sdncVersion = execution.getVariable(Prefix + "sdncVersion")
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteVfModuleInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ </vf-module-information>
+ <vf-module-request-input/>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ msoLogger.debug("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+ }
+
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing VnfAdapterDeleteV1 request
+ public void prepVNFAdapterRequest(DelegateExecution execution) {
+
+ def requestId = UUID.randomUUID().toString()
+ def origRequestId = execution.getVariable('requestId')
+ def srvInstId = execution.getVariable("serviceInstanceId")
+ def aicCloudRegion = execution.getVariable("cloudSiteId")
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ def vfModuleStackId = execution.getVariable('DDVMFV_heatStackId')
+ def tenantId = execution.getVariable("tenantId")
+ def messageId = execution.getVariable('requestId') + '-' +
+ System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String request = """
+ <deleteVfModuleRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vfModuleStackId>${MsoUtils.xmlEscape(vfModuleStackId)}</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(origRequestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(srvInstId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteVfModuleRequest>
+ """ as String
+
+ msoLogger.debug("vnfAdapterRestV1Request: " + request)
+ msoLogger.debug("deleteVfModuleRequest: " + request)
+ execution.setVariable("vnfAdapterRestV1Request", request)
+ }
+
+
+ // generates a WorkflowException if
+ // -
+ public void handleDoDeleteVfModuleFailure(DelegateExecution execution) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "AAI error occurred deleting the Generic Vnf: " + execution.getVariable("DDVFMV_deleteGenericVnfResponse"), "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable("DDVFMV_deleteGenericVnfResponse"))
+ execution.setVariable("WorkflowException", exception)
+ }
+
+ public void postProcessVNFAdapterRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.trace("STARTED postProcessVNFAdapterRequest Process")
+
+ String vnfResponse = execution.getVariable("DDVMFV_doDeleteVfModuleResponse")
+ msoLogger.debug("VNF Adapter Response is: " + vnfResponse)
+ msoLogger.debug("deleteVnfAResponse is: \n" + vnfResponse)
+
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("deleteVfModuleResponse")){
+ msoLogger.debug("Received a Good Response from VNF Adapter for DELETE_VF_MODULE Call.")
+ execution.setVariable("DDVFMV_vnfVfModuleDeleteCompleted", true)
+
+ // Parse vnfOutputs for contrail network polcy FQDNs
+ def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+ if(!isBlank(vfModuleOutputsXml)) {
+ vfModuleOutputsXml = utils.removeXmlNamespaces(vfModuleOutputsXml)
+ List contrailNetworkPolicyFqdnList = []
+ for(Node node: utils.getMultNodeObjects(vfModuleOutputsXml, "entry")) {
+ String key = utils.getChildNodeText(node, "key")
+ if(key == null) {
+
+ } else if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = utils.getChildNodeText(node, "value")
+ msoLogger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = utils.getChildNodeText(node, "value")
+ msoLogger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address)
+ execution.setVariable(Prefix + "oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = utils.getChildNodeText(node, "value")
+ msoLogger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address)
+ execution.setVariable(Prefix + "oamManagementV6Address", oamManagementV6Address)
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ msoLogger.debug("Setting the fqdn list")
+ execution.setVariable("DDVFMV_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ msoLogger.debug("Received a BAD Response from VNF Adapter for DELETE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ msoLogger.debug("Response from VNF Adapter is Null for DELETE_VF_MODULE Call.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Internal Error Occured in PostProcess Method")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+ }
+ msoLogger.trace("COMPLETED postProcessVnfAdapterResponse Process")
+ }
+
+ public void deleteNetworkPoliciesFromAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED deleteNetworkPoliciesFromAAI ")
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DDVFMV_contrailNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ msoLogger.debug("No network policies to delete")
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable("DDVFMV_networkPolicyFqdnCount", fqdnCount)
+ msoLogger.debug("DDVFMV_networkPolicyFqdnCount - " + fqdnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ if (fqdnCount > 0) {
+ // AII loop call over contrail network policy fqdn list
+ for (i in 0..fqdnCount-1) {
+
+ int counting = i+1
+ String fqdn = fqdnList[i]
+
+ // Query AAI for this network policy FQDN
+
+ String queryNetworkPolicyByFqdnAAIRequest = "${aai_endpoint}${aai_uri}?network-policy-fqdn=" + UriUtils.encode(fqdn, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ msoLogger.debug("The return code is: " + returnCode)
+ // This network policy FQDN exists in AAI - need to delete it now
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable("DDVFMV_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ msoLogger.debug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText(aaiResponseAsString, "network-policy-id")
+ msoLogger.debug("Deleting network-policy with network-policy-id " + networkPolicyId)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText(aaiResponseAsString, "resource-version")
+ msoLogger.debug("Deleting network-policy with resource-version " + resourceVersion)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+ msoLogger.debug("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+
+ msoLogger.debug("invoking DELETE call to AAI")
+ msoLogger.debug("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable("DDVFMV_aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ msoLogger.debug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ msoLogger.debug("The return code from deleting network policy is: " + returnCodeDel)
+ // This network policy was deleted from AAI successfully
+ msoLogger.debug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ")
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ msoLogger.debug(delErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ msoLogger.debug("The return code is: " + returnCode)
+ msoLogger.debug("This network policy FQDN is not in AAI: " + fqdn)
+ msoLogger.debug("Network policy FQDN is not in AAI")
+ } 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 deleteNetworkPoliciesFromAAI - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ msoLogger.debug("No contrail network policies to query/create")
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoDeletVfModule flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ // and formulate the outgoing DeleteAAIVfModuleRequest request
+ public void prepDeleteAAIVfModule(DelegateExecution execution) {
+
+
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<DeleteAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ </DeleteAAIVfModuleRequest>""" as String
+ msoLogger.debug("DeleteAAIVfModuleRequest :" + request)
+
+ execution.setVariable("DeleteAAIVfModuleRequest", request)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
new file mode 100644
index 0000000000..b1cef477be
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
@@ -0,0 +1,355 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+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.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVfModuleVolumeV2.class);
+
+ String prefix="DDVMV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ XmlParser xmlParser = new XmlParser()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ @Override
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ /**
+ * Set default variable values
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void preProcessRequest (DelegateExecution execution, isDebugEnabled) {
+
+ //Input:
+ // msoRequestId
+ // isDebugLogEnabled
+ // failIfNotFound (Optional)
+ // serviceInstanceId (Optional)
+ // vnfId (Optional)
+ // volumeGroupId
+ // vfModuleModelInfo (Optional)
+ // lcpCloudRegionId (Optional) @TODO: this is actually required
+ // tenantId (Optional) @TODO: this is actually required
+ // cloudConfiguration @TODO: temporary solution? this contains lcpCloudregion and tenantId
+ //
+ //Output:
+ // workflowException @TODO: actual variable name is WorkflowException
+ // rolledBack
+ // wasDeleted
+
+ execution.setVariable('prefix', prefix)
+ execution.setVariable('wasDeleted', 'false')
+
+ def tenantId = execution.getVariable("tenantId")
+ def cloudSiteId = execution.getVariable("lcpCloudRegionId")
+
+ // if tenantId or lcpCloudregionId is not passed, get it from cloudRegionConfiguration variable
+ if(!tenantId || !cloudSiteId) {
+ def cloudConfiguration = execution.getVariable("cloudConfiguration")
+ msoLogger.debug("Using cloudConfiguration variable to get tenantId and lcpCloudRegionId - " + cloudConfiguration)
+ tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("tenantId", tenantId)
+ cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", cloudSiteId)
+ }
+ }
+
+
+ /**
+ * Set out 'wasDeleted' variable to 'true'
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void postProcess(DelegateExecution execution, isDebugLogEnabled) {
+ execution.setVariable('wasDeleted', 'true')
+ }
+
+
+ /**
+ * Query and set cloud region to use for AAI calls
+ * Output variables: prefix+'aicCloudRegion', prefix+'cloudRegion'
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAICloudRegion(DelegateExecution execution, isDebugEnabled) {
+
+ String cloudRegion = execution.getVariable('lcpCloudRegionId')
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint",execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ msoLogger.debug(queryCloudRegionRequest)
+ msoLogger.debug("AAI query cloud region URI - " + queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable(prefix+"queryCloudRegionReturnCode") == "404") {
+ execution.setVariable(prefix+"aicCloudRegion", "AAIAIC25")
+ }
+ else{
+ execution.setVariable(prefix+"aicCloudRegion", cloudRegion)
+ }
+ }
+ else {
+ msoLogger.debug("AAI Query Cloud Region Unsuccessful.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable(prefix+"queryCloudRegionReturnCode"))
+ }
+ }
+
+
+ /**
+ * Query AAI Volume Group
+ * Output variables: prefix+'queryAAIVolGrpResponse'; prefix+'volumeGroupHeatStackId'
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void callRESTQueryAAIForVolumeGroup(DelegateExecution execution, isDebugLogEnabled) {
+
+ def tenantId = execution.getVariable('tenantId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ if(volumeGroupId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, 'volumeGroupId is not provided in the request')
+ throw new Exception('volume-group-id is not provided in the request')
+ }
+ String cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ msoLogger.debug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ msoLogger.debug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query volume group by id return code: " + returnCode)
+ msoLogger.debug("AAI query volume group by id response: " + aaiResponseAsString)
+ msoLogger.debug('AAI query volume group by id return code: ' + returnCode)
+ msoLogger.debug('AAI query volume group by id response: ' + aaiResponseAsString)
+
+ execution.setVariable(prefix+"queryAAIVolGrpResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode == '204') {
+
+ def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ execution.setVariable(prefix+'volumeGroupHeatStackId', heatStackId)
+
+ msoLogger.debug('Heat stack id from AAI response: ' + heatStackId)
+
+ if(hasVfModuleRelationship(aaiResponseAsString)){
+ msoLogger.debug('Volume Group ' + volumeGroupId + ' currently in use')
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+ }
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ msoLogger.debug('Tenant ID from AAI response: ' + volumeGroupTenantId)
+
+ if (volumeGroupTenantId == null) {
+ msoLogger.debug("Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ }
+
+ if (volumeGroupTenantId != tenantId) {
+ def String errorMessage = 'TenantId ' + tenantId + ' in incoming request does not match Tenant Id ' + volumeGroupTenantId + ' retrieved from AAI for Volume Group Id ' + volumeGroupId
+ msoLogger.debug("Error in DeleteVfModuleVolume: " + errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, errorMessage)
+ }
+ msoLogger.debug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId )
+ }
+ else {
+ if (returnCode=='404') {
+ msoLogger.debug("Volume Group ${volumeGroupId} not found in AAI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} not found in AAI. Response code: 404")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Format VNF Adapter subflow request XML
+ * Variables: prefix+'deleteVnfARequest'
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void prepareVnfAdapterDeleteRequest(DelegateExecution execution, isDebugLogEnabled) {
+ def cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
+ def tenantId = execution.getVariable('tenantId') // input parameter (optional) - see preProcessRequest
+ def volumeGroupId = execution.getVariable('volumeGroupId') // input parameter (required)
+ def volumeGroupHeatStackId = execution.getVariable(prefix+'volumeGroupHeatStackId') // from AAI query volume group
+ def requestId = execution.getVariable('msoRequestId') // input parameter (required)
+ def serviceId = execution.getVariable('serviceInstanceId') // imput parameter (optional)
+
+ def messageId = UUID.randomUUID().toString()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <deleteVolumeGroupRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </deleteVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable(prefix+'deleteVnfARequest', vnfAdapterRestRequest)
+ msoLogger.debug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest)
+ }
+
+
+ /**
+ * Delete volume group in AAI
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTDeleteAAIVolumeGroup(DelegateExecution execution, isDebugEnabled) {
+
+ // get variables
+ String queryAAIVolGrpIdResponse = execution.getVariable(prefix+"queryAAIVolGrpResponse")
+ String groupId = utils.getNodeText(queryAAIVolGrpIdResponse, "volume-group-id")
+ String resourceVersion = utils.getNodeText(queryAAIVolGrpIdResponse, "resource-version")
+
+ String messageId = UUID.randomUUID().toString()
+ String cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+
+ if(resourceVersion !=null){
+ deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
+ }
+
+ msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+ msoLogger.debug("Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI delete volume group return code: " + returnCode)
+ msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
+ msoLogger.debug("AAI delete volume group return code: " + returnCode)
+ msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ if (returnCode=='200' || (returnCode == '204')) {
+ msoLogger.debug("Volume group $groupId deleted.")
+ } else {
+ if (returnCode=='404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $groupId not found for delete in AAI Response code: 404")
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+
+ /**
+ * Check if volume group has a relationship to vf-module
+ * @param volumeGroupXml
+ * @return
+ */
+ private boolean hasVfModuleRelationship(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('vf-module'))) {
+ def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+ if (relatedLink !=null && relatedLink.text() != null){
+ return true
+ }
+ }
+ }
+ }
+ return false
+ }
+
+
+ /**
+ * Extract the Tenant Id from the Volume Group information returned by AAI.
+ * @param volumeGroupXml Volume Group XML returned by AAI.
+ * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+ * the Tenant Id is missing or could not otherwise be extracted.
+ */
+ private String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+ def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationship in relationships) {
+ def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+ def NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+ for (Node relationshipData in relationshipDataList) {
+ def Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+ if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+ def Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+ if (relationshipValue != null) {
+ return relationshipValue.text()
+ }
+ }
+ }
+ }
+ }
+ }
+ return null
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
new file mode 100644
index 0000000000..699e9bf40a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
@@ -0,0 +1,161 @@
+/*-
+ * ============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 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.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+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 org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This class supports the DoDeleteVnf subFlow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoDeleteVnf extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVnf.class);
+
+ String Prefix="DoDVNF_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoDeleteVnf PreProcessRequest Process")
+
+ execution.setVariable("DoDVNF_SuccessIndicator", false)
+ execution.setVariable("DoDVNF_vnfInUse", false)
+
+ try{
+ // Get Variables
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DoDVNF_vnfId", vnfId)
+ msoLogger.debug("Incoming Vnf(Instance) Id is: " + vnfId)
+
+ // Setting for sub flow calls
+ execution.setVariable("DoDVNF_type", "generic-vnf")
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoDeleteVnf PreProcessRequest method!" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoDeleteVnf PreProcessRequest Process ")
+ }
+
+
+ public void processGetVnfResponse(DelegateExecution execution){
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoDeleteVnf processGetVnfResponse Process ")
+ try {
+ String vnf = execution.getVariable("DoDVNF_genericVnf")
+ String resourceVersion = utils.getNodeText(vnf, "resource-version")
+ execution.setVariable("DoDVNF_resourceVersion", resourceVersion)
+
+ if(utils.nodeExists(vnf, "relationship")){
+ InputSource source = new InputSource(new StringReader(vnf));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document vnfXml = docBuilder.parse(source)
+
+ NodeList nodeList = vnfXml.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("volume-group") || e.equals("l3-network")){
+ msoLogger.debug("Generic Vnf still has relationship to OpenStack.")
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ }else{
+ msoLogger.debug("Relationship NOT related to OpenStack")
+ }
+ }
+ }
+ }
+
+ if(utils.nodeExists(vnf, "vf-module")){
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ msoLogger.debug("Generic Vnf still has vf-modules.")
+ }
+
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in DoDeleteVnf processGetVnfResponse Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf processGetVnfResponse Process")
+
+ }
+ msoLogger.trace("COMPLETED DoDeleteVnf processGetVnfResponse Process ")
+ }
+
+ /**
+ * Deletes the generic vnf from aai
+ */
+ public void deleteVnf(DelegateExecution execution) {
+ msoLogger.trace("STARTED deleteVnf")
+ try {
+ String vnfId = execution.getVariable("DoDVNF_vnfId")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient();
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ resourceClient.delete(uri)
+
+ msoLogger.trace("COMPLETED deleteVnf")
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in DoDeleteVnf deleteVnf Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf deleteVnf Process")
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
new file mode 100644
index 0000000000..d448dd3e79
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -0,0 +1,538 @@
+/*-
+ * ============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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.json.JSONArray;
+import org.json.JSONObject;
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ModuleResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+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.springframework.web.util.UriUtils;
+
+/**
+ * This class supports the macro VID Flow
+ * with the deletion of a generic vnf and related VF modules.
+ */
+class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteVnfAndModules.class);
+
+ String Prefix="DDVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoDeleteVnfAndModules PreProcessRequest Process")
+
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ msoLogger.debug("Cloud Configuration: " + cloudConfiguration)
+
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ msoLogger.debug("Incoming Request Id is: " + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("Incoming Vnf Id is: " + vnfId)
+
+ String source = "VID"
+ execution.setVariable("DDVAM_source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ execution.setVariable("DDVAM_isVidRequest", "true")
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1702"
+ }
+ execution.setVariable("DDVAM_sdncVersion", sdncVersion)
+ msoLogger.debug("Incoming Sdnc Version is: " + sdncVersion)
+
+ // Set aLaCarte flag to false
+ execution.setVariable("aLaCarte", false)
+
+ String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback", execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
+
+
+ if (!sdncVersion.equals("1702")) {
+ //String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ //String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DDVAM_serviceId", serviceId)
+ msoLogger.debug("Incoming Service Id is: " + serviceId)
+
+
+ //String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId")
+ //execution.setVariable("DDVAM_modelInvariantId", modelInvariantId)
+ //msoLogger.debug("Incoming Invariant Id is: " + modelInvariantId)
+
+ //String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId")
+ //if (modelVersionId == null) {
+ // modelVersionId = ""
+ //}
+ //execution.setVariable("DDVAM_modelVersionId", modelVersionId)
+ //msoLogger.debug("Incoming Version Id is: " + modelVersionId)
+
+ //String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
+ //execution.setVariable("DDVAM_modelVersion", modelVersion)
+ //msoLogger.debug("Incoming Model Version is: " + modelVersion)
+
+ //String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
+ //execution.setVariable("DDVAM_modelName", modelName)
+ //msoLogger.debug("Incoming Model Name is: " + modelName)
+
+ //String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId")
+ //if (modelCustomizationId == null) {
+ // modelCustomizationId = ""
+ //}
+ //execution.setVariable("DDVAM_modelCustomizationId", modelCustomizationId)
+ //msoLogger.debug("Incoming Model Customization Id is: " + modelCustomizationId)
+
+ String cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("DDVAM_cloudSiteId", cloudSiteId)
+ msoLogger.debug("Incoming Cloud Site Id is: " + cloudSiteId)
+
+ String tenantId = execution.getVariable("tenantId")
+ execution.setVariable("DDVAM_tenantId", tenantId)
+ msoLogger.debug("Incoming Tenant Id is: " + tenantId)
+
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if (globalSubscriberId == null) {
+ globalSubscriberId = ""
+ }
+ execution.setVariable("DDVAM_globalSubscriberId", globalSubscriberId)
+ msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
+
+ }
+ execution.setVariable("DDVAM_vfModulesFromDecomposition", null)
+ // Retrieve serviceDecomposition if present
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ if (serviceDecomposition != null) {
+ msoLogger.debug("Getting Catalog DB data from ServiceDecomposition object: " + serviceDecomposition.toJsonString())
+ List<VnfResource> vnfs = serviceDecomposition.getVnfResources()
+ msoLogger.debug("Read vnfs")
+ if (vnfs == null) {
+ msoLogger.debug("Error - vnfs are empty in serviceDecomposition object")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in preProcessRequest - vnfs are empty")
+ }
+ VnfResource vnf = vnfs[0]
+
+ if (vnf == null) {
+ msoLogger.debug("Error - vnf is empty in serviceDecomposition object")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in preProcessRequest - vnf is empty")
+ }
+
+ List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
+
+ execution.setVariable("DDVAM_vfModulesFromDecomposition", vfModules)
+ }
+
+ execution.setVariable("DDVAM_moduleCount", 0)
+ execution.setVariable("DDVAM_nextModule", 0)
+
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoDeleteVnfAndModules PreProcessRequest Process ")
+ }
+
+
+
+ public void preProcessAddOnModule(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessAddOnModule ")
+
+ try {
+ JSONArray addOnModules = (JSONArray) execution.getVariable("addOnModules")
+ int addOnIndex = (int) execution.getVariable("addOnModulesDeployed")
+
+ JSONObject addOnModule = addOnModules[addOnIndex]
+
+ def newVfModuleId = UUID.randomUUID().toString()
+ execution.setVariable("addOnVfModuleId", newVfModuleId)
+
+ execution.setVariable("instancesOfThisModelDeployed", 0)
+
+ JSONObject addOnVfModuleModelInfoObject = jsonUtil.getJsonValueForKey(addOnModule, "modelInfo")
+ String addOnVfModuleModelInfo = addOnVfModuleModelInfoObject.toString()
+ execution.setVariable("addOnVfModuleModelInfo", addOnVfModuleModelInfo)
+ String addOnVfModuleLabel = jsonUtil.getJsonValueForKey(addOnModule, "vfModuleLabel")
+ execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
+ String addOnPersonaModelId = jsonUtil.getJsonValueForKey(addOnVfModuleModelInfoObject, "modelInvariantUuid")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCAssignRequest ")
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.queryAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ msoLogger.debug("AAI endPoint: " + endPoint)
+
+ try {
+ msoLogger.debug("createVfModule - invoking httpGet() to AAI")
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+
+ def responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ msoLogger.debug("createVfModule - queryAAIVfModule Response: " + responseData)
+ msoLogger.debug("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ //Map<String, String>[] vfModules = new HashMap<String,String>[]
+ List<ModuleResource> vfModulesFromDecomposition = execution.getVariable("DDVAM_vfModulesFromDecomposition")
+ def vfModulesList = new ArrayList<Map<String,String>>()
+ def vfModules = null
+ def vfModuleBaseEntry = null
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find base module info')
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ msoLogger.debug("vModulesText: " + vfModulesText)
+ if (vfModulesText != null && !vfModulesText.trim().isEmpty()) {
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ execution.setVariable("DDVAM_moduleCount", vfModules.size())
+ int vfModulesSize = 0
+ ModelInfo vfModuleModelInfo = null
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+
+ Map<String, String> vfModuleEntry = new HashMap<String, String>()
+ def vfModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
+ vfModuleEntry.put("vfModuleId", vfModuleId)
+ def vfModuleName = utils.getNodeText(vfModuleXml, "vf-module-name")
+ vfModuleEntry.put("vfModuleName", vfModuleName)
+
+ // Find the model for this vf module in decomposition if specified
+ if (vfModulesFromDecomposition != null) {
+ msoLogger.debug("vfModulesFromDecomposition is not null")
+ def vfModuleUuid = utils.getNodeText(vfModuleXml, "model-version-id")
+ if (vfModuleUuid == null) {
+ vfModuleUuid = utils.getNodeText(vfModuleXml, "persona-model-version")
+ }
+ msoLogger.debug("vfModule UUID is: " + vfModuleUuid)
+ for (j in 0..vfModulesFromDecomposition.size()-1) {
+ ModuleResource mr = vfModulesFromDecomposition[j]
+ if (mr.getModelInfo().getModelUuid() == vfModuleUuid) {
+ msoLogger.debug("Found modelInfo")
+ vfModuleModelInfo = mr.getModelInfo()
+ break
+ }
+
+ }
+ }
+ if (vfModuleModelInfo != null) {
+ String vfModuleModelInfoString = vfModuleModelInfo.toString()
+ def vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfoString, "modelInfo")
+ vfModuleEntry.put("vfModuleModelInfo", vfModuleModelInfoValue)
+ }
+ else {
+ vfModuleEntry.put("vfModuleModelInfo", null)
+ }
+
+
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+ // Save base vf module for last
+ if (isBaseVfModule == "true") {
+ vfModuleBaseEntry = vfModuleEntry
+ }
+ else {
+ vfModulesList.add(vfModuleEntry)
+ }
+ }
+ if (vfModuleBaseEntry != null) {
+ vfModulesList.add(vfModuleBaseEntry)
+ }
+ }
+
+ }
+ }
+ execution.setVariable("DDVAM_vfModules", vfModulesList)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ public void prepareNextModuleToDelete(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED prepareNextModuleToDelete ")
+
+ try {
+ int i = execution.getVariable("DDVAM_nextModule")
+ def vfModules = execution.getVariable("DDVAM_vfModules")
+ def vfModule = vfModules[i]
+
+ def vfModuleId = vfModule.get("vfModuleId")
+ execution.setVariable("DDVAM_vfModuleId", vfModuleId)
+
+ def vfModuleName = vfModule.get("vfModuleName")
+ execution.setVariable("DDVAM_vfModuleName", vfModuleName)
+
+ def vfModuleModelInfo = vfModule.get("vfModuleModelInfo")
+ msoLogger.debug("vfModuleModelInfo for module delete: " + vfModuleModelInfo)
+ execution.setVariable("DDVAM_vfModuleModelInfo", vfModuleModelInfo)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareNextModuleToDelete Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED prepareNextModuleToDelete ")
+ }
+
+ public void preProcessSDNCDeactivateRequest(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCDeactivateRequest ")
+ def vnfId = execution.getVariable("vnfId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ try{
+ //Build SDNC Request
+
+ String deactivateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "deactivate")
+
+ deactivateSDNCRequest = utils.formatXml(deactivateSDNCRequest)
+ execution.setVariable("DDVAM_deactivateSDNCRequest", deactivateSDNCRequest)
+ msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
+ msoLogger.debug("Outgoing DeactivateSDNCRequest is: \n" + deactivateSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCDeactivateRequest." + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCDeactivateRequest ")
+ }
+
+ public void preProcessSDNCUnassignRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCUnassignRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED preProcessSDNCUnassignRequest Process ")
+ try{
+ String vnfId = execution.getVariable("vnfId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String unassignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "unassign")
+
+ execution.setVariable("DDVAM_unassignSDNCRequest", unassignSDNCRequest)
+ msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
+ msoLogger.debug("Outgoing UnassignSDNCRequest is: \n" + unassignSDNCRequest)
+
+ }catch(Exception e){
+ msoLogger.debug("Exception Occured Processing preProcessSDNCUnassignRequest. Exception is:\n" + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCUnassignRequest Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED preProcessSDNCUnassignRequest Process ")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action){
+
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
+ }
+ def callbackURL = execution.getVariable("sdncCallbackUrl")
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceId = execution.getVariable("DDVAM_serviceId")
+ def tenantId = execution.getVariable("DDVAM_tenantId")
+ def source = execution.getVariable("DDVAM_source")
+ def vnfId = execution.getVariable("vnfId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def cloudSiteId = execution.getVariable("DDVAM_cloudSiteId")
+ def modelCustomizationId = execution.getVariable("DDVAM_modelCustomizationId")
+ //def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ //def vnfModelInfo = execution.getVariable("vnfModelInfo")
+ //String serviceEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(serviceModelInfo)
+ //String vnfEcompModelInformation = sdncAdapterUtils.modelInfoToEcompModelInformation(vnfModelInfo)
+ def globalSubscriberId = execution.getVariable("DDVAM_globalSubscriberId")
+ def sdncVersion = execution.getVariable("DDVAM_sdncVersion")
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteVnfInstance</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vnf-request-input>
+ <vnf-name/>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(cloudSiteId)}</aic-cloud-region>
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ msoLogger.debug("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+ }
+
+
+
+
+
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
new file mode 100644
index 0000000000..41d9384f52
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 CMCC 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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.json.JSONArray;
+import org.json.JSONObject;
+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.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils;
+
+
+
+/**
+ * This groovy class supports the <class>DoScaleServiceInstance.bpmn</class> process.
+ *
+ */
+public class DoScaleE2EServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoScaleE2EServiceInstance.class);
+
+
+ String Prefix = "DCRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest(DelegateExecution execution) {
+ String msg = ""
+ msoLogger.trace("preProcessRequest ")
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix", Prefix)
+
+ //Inputs
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ execution.setVariable("serviceType", serviceType)
+
+ String resourceTemplateUUIDs = ""
+ String scaleNsRequest = execution.getVariable("bpmnRequest")
+ JSONObject jsonObject = new JSONObject(scaleNsRequest).getJSONObject("service")
+ JSONArray jsonArray = jsonObject.getJSONArray("resources")
+
+ for (int i = 0; i < jsonArray.size(); i++) {
+ JSONObject reqBodyJsonObj = jsonArray.getJSONObject(i)
+ String nsInstanceId = reqBodyJsonObj.getString("resourceInstanceId")
+ resourceTemplateUUIDs = resourceTemplateUUIDs + nsInstanceId + ":"
+ }
+
+ execution.setVariable("resourceTemplateUUIDs", resourceTemplateUUIDs)
+
+ if (serviceInstanceName == null) {
+ execution.setVariable("serviceInstanceName", "")
+ }
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ msoLogger.trace("STARTED preInitResourcesOperStatus Process ")
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = "SCALE"
+
+ // resourceTemplateUUIDs should be created ??
+ String resourceTemplateUUIDs = execution.getVariable("resourceTemplateUUIDs")
+ msoLogger.info("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ msoLogger.info("Outgoing initResourceOperationStatus: \n" + payload)
+ msoLogger.debug("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch(Exception e){
+ 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 ")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
new file mode 100644
index 0000000000..e06e5238c6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
@@ -0,0 +1,332 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 CMCC. 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.DelegateExecution
+import org.json.JSONArray
+import org.json.JSONObject;
+
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.core.json.JsonUtils
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import com.fasterxml.jackson.databind.ObjectMapper
+
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.onap.so.rest.APIResponse;
+
+import org.onap.so.bpmn.infrastructure.vfcmodel.ScaleResource
+import org.onap.so.bpmn.infrastructure.vfcmodel.ScaleNsByStepsData
+import org.onap.so.bpmn.infrastructure.vfcmodel.ScaleNsData
+
+import org.onap.so.bpmn.infrastructure.vfcmodel.NSResourceInputParameter
+import org.onap.so.bpmn.infrastructure.vfcmodel.NsOperationKey
+import org.onap.so.bpmn.infrastructure.vfcmodel.NsScaleParameters
+import org.onap.so.bpmn.infrastructure.vfcmodel.NsParameters
+import org.onap.so.bpmn.infrastructure.vfcmodel.LocationConstraint
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+
+
+/**
+ * This groovy class supports the <class>DoScaleVFCNetworkServiceInstance.bpmn</class> process.
+ * flow for VFC Network Service Scale
+ */
+public class DoScaleVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoScaleVFCNetworkServiceInstance.class);
+
+
+ String host = "http://mso.mso.testlab.openecomp.org:8080"
+
+ String scaleUrl = "/vfc/rest/v1/vfcadapter/ns/{nsInstanceId}/scale"
+
+ String queryJobUrl = "/vfc/rest/v1/vfcadapter/jobs/{jobId}"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Pre Process the BPMN Flow Request
+ * Inclouds:
+ * generate the nsOperationKey
+ * generate the nsParameters
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ msoLogger.trace("preProcessRequest() ")
+
+ List<NSResourceInputParameter> nsRIPList = convertScaleNsReq2NSResInputParamList(execution)
+ String requestJsonStr = ""
+ int size = nsRIPList.size()
+ for (int i = 0; i < size; i++) {
+ NSResourceInputParameter nsRIP = nsRIPList.get(i)
+
+ if (i == size - 1) {
+ requestJsonStr += objectToJsonStr(nsRIP)
+ } else {
+ requestJsonStr += objectToJsonStr(nsRIP) + "|"
+ }
+ }
+
+ execution.setVariable("reqBody", requestJsonStr)
+
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ /**
+ * scale NS task
+ */
+ public void scaleNetworkService(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ String saleNsRequest = execution.getVariable("reqBody")
+ String[] nsReqStr = saleNsRequest.split("\\|")
+
+ for (int i = 0; i < nsReqStr.length; i++) {
+ JSONObject reqBodyJsonObj = new JSONObject(nsReqStr[i])
+ String nsInstanceId = reqBodyJsonObj.getJSONObject("nsScaleParameters").getString("nsInstanceId")
+ String nodeTemplateUUID = reqBodyJsonObj.getJSONObject("nsOperationKey").getString("nodeTemplateUUID")
+ reqBodyJsonObj.getJSONObject("nsScaleParameters").remove("nsInstanceId")
+ String reqBody = reqBodyJsonObj.toString()
+
+ String url = host + scaleUrl.replaceAll("\\{nsInstanceId\\}", nsInstanceId)
+
+ APIResponse apiResponse = postRequest(execution, url, reqBody)
+
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ String jobId = ""
+ if (returnCode == "200" || returnCode == "202") {
+ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
+ }
+ utils.log("INFO", "scaleNetworkService get a ns scale job Id:" + jobId, isDebugEnabled)
+ execution.setVariable("jobId", jobId)
+ execution.setVariable("nodeTemplateUUID", nodeTemplateUUID)
+
+ String isScaleFinished = ""
+
+ if(jobId =="" || jobId == null){
+ continue
+ }
+ // query the requested network service scale status, if finished, then start the next one, otherwise, wait
+ while (isScaleFinished != "finished" && isScaleFinished != "error"){
+ timeDelay()
+ queryNSProgress(execution)
+ isScaleFinished = execution.getVariable("operationStatus")
+ }
+ }
+ }
+
+ /**
+ * query NS task
+ */
+ private void queryNSProgress(DelegateExecution execution) {
+ String jobId = execution.getVariable("jobId")
+ String url = host + queryJobUrl.replaceAll("\\{jobId\\}", jobId)
+
+ NsOperationKey nsOperationKey = new NsOperationKey()
+ // is this net work service ID or E2E service ID?
+ nsOperationKey.setServiceId(execution.getVariable("serviceId"))
+ nsOperationKey.setServiceType(execution.getVariable("serviceType"))
+ nsOperationKey.setGlobalSubscriberId(execution.getVariable("globalSubscriberId"))
+ nsOperationKey.setNodeTemplateUUID(execution.getVariable("nodeTemplateUUID"))
+ nsOperationKey.setOperationId(execution.getVariable("operationId"))
+ String queryReqBody = objectToJsonStr(nsOperationKey)
+
+ APIResponse apiResponse = postRequest(execution,url, queryReqBody)
+
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+
+ String operationStatus = "error"
+
+ if (returnCode == "200") {
+ operationStatus = jsonUtil.getJsonValue(aaiResponseAsString, "responseDescriptor.status")
+ }
+
+ execution.setVariable("operationStatus", operationStatus)
+ }
+
+ /**
+ * delay 5 sec
+ *
+ */
+ private void timeDelay() {
+ try {
+ Thread.sleep(5000)
+ } catch (InterruptedException e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Time Delay exception" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ }
+ }
+
+ /**
+ * finish NS task
+ */
+ public void finishNSScale(DelegateExecution execution) {
+ //no need to do anything util now
+ System.out.println("Scale finished.")
+ }
+
+ /**
+ * post request
+ * url: the url of the request
+ * requestBody: the body of the request
+ */
+ private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){
+ msoLogger.trace("Started Execute VFC adapter Post Process ")
+ msoLogger.info("url:"+url +"\nrequestBody:"+ requestBody)
+ APIResponse apiResponse = null
+ try{
+ RESTConfig config = new RESTConfig(url)
+ RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk")
+// RESTClient client = new RESTClient(config).addHeader("Content-Type", "application/json").addHeader("Accept","application/json").addHeader("Authorization","Basic QlBFTENsaWVudDpwYXNzd29yZDEk")
+ apiResponse = client.httpPost(requestBody)
+ msoLogger.info("response code:"+ apiResponse.getStatusCode() +"\nresponse body:"+ apiResponse.getResponseBodyAsString())
+ msoLogger.trace("Completed Execute VF-C adapter Post Process ")
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception occured while executing VFC Post Call.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ /**
+ * create a Scale Resource object list from a NSScaleRequestJso nString
+ * This method is for the specific request from Scale Network Service BPMN workflow
+ * @param nsScaleRequestJsonString , a specific request Json string which conform to ?? class
+ * @return List < ScaleResource >
+ */
+ private List<ScaleResource> jsonGetNsResourceList(String nsScaleRequestJsonString) {
+ List<ScaleResource> list = new ArrayList<ScaleResource>()
+ JSONObject jsonObject = new JSONObject(nsScaleRequestJsonString)
+
+ JSONObject jsonResource = jsonObject.getJSONObject("service")
+ JSONArray arr = jsonResource.getJSONArray("resources")
+
+ for (int i = 0; i < arr.length(); i++) {
+ JSONObject tempResource = arr.getJSONObject(i)
+ ScaleResource resource = new ScaleResource()
+ resource.setResourceInstanceId(tempResource.getString("resourceInstanceId"))
+ resource.setScaleType(tempResource.getString("scaleType"))
+
+ JSONObject jsonScaleNsData = tempResource.getJSONObject("scaleNsData")
+ JSONObject jsonScaleNsByStepData = jsonScaleNsData.getJSONObject("scaleNsByStepsData")
+
+ ScaleNsData scaleNsData = new ScaleNsData()
+ ScaleNsByStepsData stepsData = new ScaleNsByStepsData()
+
+ stepsData.setAspectId(jsonScaleNsByStepData.getString("aspectId"))
+ stepsData.setScalingDirection(jsonScaleNsByStepData.getString("scalingDirection"))
+ stepsData.setNumberOfSteps(Integer.parseInt(jsonScaleNsByStepData.getString("numberOfSteps")))
+
+ scaleNsData.setScaleNsByStepsData(stepsData)
+ resource.setScaleNsData(scaleNsData)
+ list.add(resource)
+ }
+
+ return list
+ }
+
+ /**
+ * Convert a java class to JSON string
+ * @param obj
+ * @return
+ */
+ private String objectToJsonStr(Object obj) {
+ ObjectMapper mapper = new ObjectMapper()
+ String jsonStr = null
+ try {
+ jsonStr = mapper.writeValueAsString(obj)
+ } catch (IOException ioe) {
+ System.out.println(ioe.getMessage())
+ }
+ return jsonStr
+
+ }
+
+ /**
+ * create a NSResourceInputParameter list from a Scale Network request Json string
+ * @return
+ */
+ private List<NSResourceInputParameter> convertScaleNsReq2NSResInputParamList(DelegateExecution execution) {
+ String saleNsRequest = execution.getVariable("bpmnRequest")
+
+ //String requestId = execution.getVariable("msoRequestId")
+ //String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ //String nodeTemplateUUID = execution.getVariable("nodeTemplateUUID")
+ String serviceType = execution.getVariable("serviceType")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String operationId = execution.getVariable("operationId")
+ String serviceId = execution.getVariable("serviceId")
+ String nsServiceDescription = execution.getVariable("requestDescription")
+
+ String resource = JsonUtils.getJsonValue(saleNsRequest, "service.resources")
+
+ // set nsScaleParameters properties
+ List<ScaleResource> scaleResourcesList = jsonGetNsResourceList(saleNsRequest)
+ List<NSResourceInputParameter> nsResourceInputParameterList = new ArrayList<NSResourceInputParameter>()
+
+ for (ScaleResource sr : scaleResourcesList) {
+ NSResourceInputParameter nsResourceInputParameter = new NSResourceInputParameter()
+ NsOperationKey nsOperationKey = new NsOperationKey()
+ NsParameters nsParameters = new NsParameters()
+ NsScaleParameters nsScaleParameters = new NsScaleParameters()
+ nsParameters.setLocationConstraints(new ArrayList<LocationConstraint>())
+ nsParameters.setAdditionalParamForNs(new HashMap<String, Object>())
+
+ // set NsOperationKey properties
+ nsOperationKey.setGlobalSubscriberId(globalSubscriberId)
+ nsOperationKey.setServiceId(serviceId)
+ nsOperationKey.setServiceType(serviceType)
+ // for ns scale the resourceInstanceId is the nodeTemplateUUID
+ nsOperationKey.setNodeTemplateUUID(sr.getResourceInstanceId())
+ nsOperationKey.setOperationId(operationId)
+
+ nsScaleParameters.setScaleType(sr.getScaleType())
+ nsScaleParameters.setNsInstanceId(sr.getResourceInstanceId())
+
+ ScaleNsByStepsData scaleNsByStepsData = new ScaleNsByStepsData()
+ scaleNsByStepsData.setScalingDirection(sr.getScaleNsData().getScaleNsByStepsData().getScalingDirection())
+ scaleNsByStepsData.setNumberOfSteps(sr.getScaleNsData().getScaleNsByStepsData().getNumberOfSteps())
+ scaleNsByStepsData.setAspectId(sr.getScaleNsData().getScaleNsByStepsData().getAspectId())
+
+ List<ScaleNsByStepsData> scaleNsByStepsDataList = new ArrayList<ScaleNsByStepsData>()
+ scaleNsByStepsDataList.add(scaleNsByStepsData)
+ nsScaleParameters.setScaleNsByStepsData(scaleNsByStepsDataList)
+
+ nsResourceInputParameter.setNsOperationKey(nsOperationKey)
+ nsResourceInputParameter.setNsServiceName(serviceInstanceName)
+ nsResourceInputParameter.setNsServiceDescription(nsServiceDescription)
+ nsResourceInputParameter.setNsParameters(nsParameters)
+ nsResourceInputParameter.setNsScaleParameters(nsScaleParameters)
+
+ nsResourceInputParameterList.add(nsResourceInputParameter)
+ }
+ return nsResourceInputParameterList
+ }
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
new file mode 100644
index 0000000000..5fb6a9df9a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
@@ -0,0 +1,451 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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.AaiUtil
+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.RollbackData
+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.springframework.web.util.UriUtils;
+
+import groovy.json.*
+
+
+/**
+ * This groovy class supports the <class>DoUpdateE2EServiceInstance.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId
+ * @param - serviceType
+ * @param - serviceInstanceId
+ * @param - serviceInstanceName
+ * @param - serviceModelInfo
+ * @param - productFamilyId
+ * @param - uuiRequest
+ * @param - serviceDecomposition_Target
+ * @param - serviceDecomposition_Original
+ * @param - addResourceList
+ * @param - delResourceList
+ *
+ * Outputs:
+ * @param - rollbackData (localRB->null)
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ * @param - WorkflowException
+ */
+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 = ""
+
+ try {
+ execution.setVariable("prefix", Prefix)
+ //Inputs
+ //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
+
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ 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
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ 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)
+
+ // 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){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO", "======== COMPLETED preProcessRequest Process ======== ", isDebugEnabled)
+ }
+
+
+ public void preInitResourcesOperStatus(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = execution.getVariable("operationType")
+ String resourceTemplateUUIDs = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service updating"
+ utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ List<Resource> resourceList = new ArrayList<String>()
+ List<Resource> addResourceList = execution.getVariable("addResourceList")
+ List<Resource> delResourceList = execution.getVariable("delResourceList")
+ resourceList.addAll(addResourceList)
+ resourceList.addAll(delResourceList)
+ 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)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <resourceTemplateUUIDs>${MsoUtils.xmlEscape(resourceTemplateUUIDs)}</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_initResOperStatusRequest", payload)
+ utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
+ utils.logAudit("CreateVfModuleInfra Outgoing initResourceOperationStatus Request: " + payload)
+
+ }catch(Exception e){
+ 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)
+ }
+
+
+ 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)
+ }
+
+ 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)
+
+ execution.setVariable("operationType", "delete")
+
+ def hasResourcetoDelete = false
+ List<Resource> delResourceList = execution.getVariable("delResourceList")
+ if(delResourceList != null && !delResourceList.isEmpty()) {
+ hasResourcetoDelete = true
+ }
+ execution.setVariable("hasResourcetoDelete", hasResourcetoDelete)
+
+ if(hasResourcetoDelete) {
+ def jsonSlurper = new JsonSlurper()
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ //Set the real resource instance id to the decomosed resource list
+ for(Resource resource: delResourceList){
+ //reset the resource instance id , because in the decompose flow ,its a random one.
+ resource.setResourceId("");
+ //match the resource-instance-name and the model name
+ if (relationShipList != null) {
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, resource.getModelInfo().getModelName())){
+ resource.setResourceId(it.resourceInstanceId);
+ }
+ }
+ }
+ }
+ }
+
+ execution.setVariable("deleteResourceList", delResourceList)
+
+ utils.log("INFO"," *** Exit preProcessForDeleteResource *** ", isDebugEnabled)
+ }
+
+ 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) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO","Entered " + method, isDebugEnabled)
+ String msg = ""
+ utils.log("INFO"," ***** preProcessAAIPUT *****", isDebugEnabled)
+
+
+ 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")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ //aai serviceType and Role can be setted as fixed value now.
+ String aaiServiceType = "E2E Service"
+ String aaiServiceRole = "E2E Service"
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("modelUuid")
+
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ 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)
+ utils.log("INFO","namespace: " + namespace, isDebugEnabled)
+
+ //update target model to aai
+ String serviceInstanceData =
+ """<service-instance xmlns=\"${namespace}\">
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ <service-type>${MsoUtils.xmlEscape(aaiServiceType)}</service-type>
+ <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>
+ </service-instance>""".trim()
+
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ utils.log("INFO","serviceInstanceData: " + serviceInstanceData, isDebugEnabled)
+ 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)
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(!succInAAI){
+ utils.log("INFO","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ }
+ else
+ {
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
+ rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
+ rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)
+ rollbackData.put("SERVICEINSTANCE", "serviceType", execution.getVariable("serviceType"))
+ rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ 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) {
+ utils.log("INFO", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("INFO", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ }
+ utils.log("INFO"," *** Exit preProcessRollback *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** postProcessRollback ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("INFO", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ utils.log("INFO", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ }
+ 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-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
new file mode 100644
index 0000000000..a2d94baaed
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
@@ -0,0 +1,345 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.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.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+
+/**
+ * This groovy class supports the <class>DoUpdateE2EServiceInstanceRollback.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - rollbackData with
+ * globalCustomerId
+ * subscriptionServiceType
+ * serviceInstanceId
+ * disableRollback
+ * rollbackAAI
+ * rollbackAdded
+ * rollbackDeleted
+ *
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateE2EServiceInstanceRollback.class);
+
+
+ String Prefix="DUPDSIRB_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ msoLogger.trace("preProcessRequest ")
+ 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("delResourceList", addResourceList)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType("SERVICEINSTANCE")) {
+
+ def serviceInstanceId = rollbackData.get("SERVICEINSTANCE", "serviceInstanceId")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ def subscriptionServiceType = rollbackData.get("SERVICEINSTANCE", "subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+
+ def globalSubscriberId = rollbackData.get("SERVICEINSTANCE", "globalSubscriberId")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+
+ def rollbackAAI = rollbackData.get("SERVICEINSTANCE", "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ }
+
+ def rollbackAdded = rollbackData.get("SERVICEINSTANCE", "rollbackAdded")
+ if ("true".equals(rollbackAdded))
+ {
+ 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
+ && execution.getVariable("rollbackDeleted") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Update ServiceInstance Rollback preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void postProcessRequest(DelegateExecution execution) {
+ msoLogger.trace("postProcessRequest ")
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ 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)
+ execution.setVariable("delResourceList", delResourceList)
+
+ if (rollbackAAI || rollbackAdded || rollbackDeleted)
+ {
+ execution.setVariable("rolledBack", true)
+ }
+ if (rollbackAAI)
+ {
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(!succInAAI){
+ execution.setVariable("rolledBack", false) //both sdnc and aai must be successful to declare rollback Succesful
+ execution.setVariable("rollbackError", "Error deleting service-instance in AAI for rollback")
+ msoLogger.debug("Error deleting service-instance in AAI for rollback", + serviceInstanceId)
+ }
+ }
+ msoLogger.trace("Exit postProcessRequest ")
+
+ } catch (BpmnError e) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + e.getMessage()
+ msoLogger.debug(msg)
+ } catch (Exception ex) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ 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) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ msoLogger.info("Entered " + method)
+ String msg = ""
+ msoLogger.trace("preProcessAAIPUT ")
+
+ 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")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ //aai serviceType and Role can be setted as fixed value now.
+ String aaiServiceType = "E2E Service"
+ String aaiServiceRole = "E2E Service"
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("model-version-id-original")
+
+ //AAI PUT
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ 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)
+ utils.log("INFO","namespace: " + namespace, isDebugEnabled)
+
+ String serviceInstanceData =
+ """<service-instance xmlns=\"${namespace}\">
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <service-instance-name>${MsoUtils.xmlEscape(serviceInstanceName)}</service-instance-name>
+ <service-type>${MsoUtils.xmlEscape(aaiServiceType)}</service-type>
+ <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>
+ </service-instance>""".trim()
+
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ msoLogger.info("serviceInstanceData: " + serviceInstanceData)
+ 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 = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(!succInAAI){
+ msoLogger.info("Error putting Service-instance in AAI", + serviceInstanceId)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ }
+ else
+ {
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ msoLogger.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit postProcessAAIPUT ")
+ }
+
+ public void processRollbackException(DelegateExecution execution){
+ msoLogger.trace("processRollbackException ")
+ try{
+ msoLogger.debug("Caught an Exception in DoUpdateE2EServiceInstanceRollback")
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught exception in ServiceInstance Update Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ msoLogger.debug("BPMN Error during processRollbackExceptions Method: ")
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processRollbackExceptions Method: " + e.getMessage())
+ }
+
+ msoLogger.debug(" Exit processRollbackException")
+ }
+
+ public void processRollbackJavaException(DelegateExecution execution){
+ msoLogger.trace("processRollbackJavaException ")
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught Java exception in ServiceInstance Update Rollback")
+ msoLogger.debug("Caught Exception in processRollbackJavaException")
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception in processRollbackJavaException " + e.getMessage())
+ }
+ msoLogger.trace("Exit processRollbackJavaException ")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
new file mode 100644
index 0000000000..7272f421fc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -0,0 +1,1408 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+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.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+import groovy.json.*
+import groovy.xml.XmlUtil
+
+/**
+ * This groovy class supports the <class>DoUpdateNetworkInstance.bpmn</class> process.
+ *
+ */
+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()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "messageId", "")
+ execution.setVariable("BasicAuthHeaderValuePO", "")
+ execution.setVariable("BasicAuthHeaderValueSDNC", "")
+ execution.setVariable(Prefix + "networkRequest", "")
+ execution.setVariable(Prefix + "networkInputs", "")
+ execution.setVariable(Prefix + "networkOutputs", "")
+ execution.setVariable(Prefix + "requestId", "")
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "networkId", "")
+
+ execution.setVariable(Prefix + "isPONR", false) // Point-of-no-return, means, rollback is not needed
+
+ // AAI query Cloud Region
+ execution.setVariable(Prefix + "queryCloudRegionRequest","")
+ execution.setVariable(Prefix + "queryCloudRegionReturnCode","")
+ execution.setVariable(Prefix + "queryCloudRegionResponse","")
+ execution.setVariable(Prefix + "cloudRegionPo","")
+ execution.setVariable(Prefix + "cloudRegionSdnc","")
+ execution.setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ execution.setVariable(Prefix + "queryIdAAIRequest","")
+ execution.setVariable(Prefix + "queryIdAAIResponse", "")
+ execution.setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ execution.setVariable(Prefix + "vpnBindings", null)
+ execution.setVariable(Prefix + "vpnCount", 0)
+ execution.setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ execution.setVariable(Prefix + "networkPolicyUriList", null)
+ execution.setVariable(Prefix + "networkPolicyCount", 0)
+ execution.setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ 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", "")
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ execution.setVariable(Prefix + "updateContrailAAIResponse", "")
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ execution.setVariable(Prefix + "updateNetworkRequest", "")
+ execution.setVariable(Prefix + "updateNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ execution.setVariable(Prefix + "networkReturnCode", "")
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ execution.setVariable(Prefix + "changeAssignSDNCRequest", "")
+ execution.setVariable(Prefix + "changeAssignSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "sdncReturnCode", "")
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", false)
+ execution.setVariable(Prefix + "sdncResponseSuccess", false)
+
+ execution.setVariable(Prefix + "isVnfBindingPresent", false)
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "serviceInstanceId", "")
+
+ execution.setVariable(Prefix + "isException", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest DoUpdateNetworkInstance Request ")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request & validate 3 kinds of format.
+ execution.setVariable("action", "UPDATE")
+ String networkRequest = execution.getVariable("bpmnRequest")
+ if (networkRequest != null) {
+ if (networkRequest.contains("requestDetails")) {
+ // 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)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ } 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 == "") {
+ messageId = UUID.randomUUID()
+ msoLogger.debug(" UPDNETI_messageId, random generated: " + messageId)
+ } else {
+ 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")
+ if (networkId == 'null' || networkId == "") {
+ sendSyncError(execution)
+ // missing value of networkId
+ 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")
+ if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
+ sendSyncError(execution)
+ String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element."
+ msoLogger.debug(" Invalid Request - " + dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ }
+
+ String serviceInstanceId = ""
+ if (utils.nodeExists(networkRequest, "service-instance-id")) {
+ serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
+ if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) {
+ sendSyncError(execution)
+ String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing."
+ msoLogger.debug(" Invalid Request - " + dataErrorMessage)
+ 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'
+ networkId = utils.getNodeText(networkRequest, "network-id")
+ if ((networkId == null) || (networkId == "null")) {
+ networkId = ""
+ }
+ String networkName = utils.getNodeText(networkRequest, "network-name")
+ if ((networkName == null) || (networkName == "null")) {
+ networkName = ""
+ }
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
+ <network-name>${MsoUtils.xmlEscape(networkName)}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ 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 DoUpdateNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAICloudRegion of DoUpdateNetworkInstance ***** " )
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ msoLogger.debug(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug(" UPDNETI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+ String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
+
+ if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+ execution.setVariable(Prefix + "cloudRegionPo", cloudRegionPo)
+ execution.setVariable(Prefix + "cloudRegionSdnc", cloudRegionSdnc)
+ execution.setVariable(Prefix + "isCloudRegionGood", true)
+
+ } else {
+ String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable(Prefix + "queryCloudRegionReturnCode")
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ msoLogger.debug(" is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"))
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkId(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkId of DoUpdateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ execution.setVariable(Prefix + "networkId", networkId)
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+ msoLogger.debug(queryIdAAIRequest)
+ execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest)
+ msoLogger.debug(Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+ msoLogger.debug(" AAI Query Failed. " + 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 QueryAAINetworkId - " + returnCode
+ msoLogger.debug("Unexpected Response from QueryAAINetworkId - " + dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTReQueryAAINetworkId(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTReQueryAAINetworkId of DoUpdateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+ msoLogger.debug(requeryIdAAIRequest)
+ execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest)
+ msoLogger.debug(" UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI ReQuery Response Code : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString)
+
+ String netId = utils.getNodeText(aaiResponseAsString, "network-id")
+ String netName = utils.getNodeText(aaiResponseAsString, "network-name")
+ String networkOutputs =
+ """<network-outputs>
+ <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)."
+ msoLogger.debug(" AAI ReQuery Failed. - " + 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 ReQueryAAINetworkId - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkVpnBinding(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkVpnBinding of DoUpdateNetworkInstance ***** " )
+
+ try {
+
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Vnf Binding is present, then build a List of vnfBinding
+ List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
+ int vpnCount = vpnBindingUri.size()
+ execution.setVariable(Prefix + "vpnCount", vpnCount)
+ msoLogger.debug(" UPDNETI_vpnCount - " + vpnCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (vpnCount > 0) {
+ execution.setVariable(Prefix + "vpnBindings", vpnBindingUri)
+ msoLogger.debug(" vpnBindingUri List - " + vpnBindingUri)
+
+ String routeTargets = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..vpnBindingUri.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryVpnBindingAAIRequest = ""
+ String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution)
+
+ // Note: By default, the vpnBinding url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1) + "?depth=all"
+ } else {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i] + "?depth=all"
+ }
+
+ } else {
+ // using uri value in URN mapping
+ String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length())
+ if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') {
+ vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1)
+ }
+ queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId + "?depth=all"
+ }
+
+ msoLogger.debug(queryVpnBindingAAIRequest)
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+ msoLogger.debug(" UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String routeTarget = ""
+ String routeRole = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-targets")) {
+ String aaiRouteTargets = utils.getNodeXml(aaiResponseAsString, "route-targets", false)
+ def aaiRouteTargetsXml = new XmlSlurper().parseText(aaiRouteTargets)
+ def aaiRouteTarget = aaiRouteTargetsXml.'**'.findAll {it.name() == "route-target"}
+ for (j in 0..aaiRouteTarget.size()-1) {
+ routeTarget = utils.getNodeText(XmlUtil.serialize(aaiRouteTarget[j]), "global-route-target")
+ routeRole = utils.getNodeText(XmlUtil.serialize(aaiRouteTarget[j]), "route-target-role")
+ routeTargets += "<routeTargets>" + '\n' +
+ " <routeTarget>" + routeTarget + "</routeTarget>" + '\n' +
+ " <routeTargetRole>" + routeRole + "</routeTargetRole>" + '\n' +
+ "</routeTargets>" + '\n'
+ }
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from AAINetworkVpnBinding 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 AAINetworkVpnBinding - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "routeCollection", routeTargets)
+ msoLogger.debug(" UPDNETI_routeCollection - " + '\n' + routeTargets)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <vpn-binding xmlns="${schemaVersion}">
+ <global-route-target/>
+ </vpn-binding>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "routeCollection", "<routeTargets/>")
+ msoLogger.debug(" No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkPolicy(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkPolicy of DoUpdateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Network Policy is present, then build a List of network policy
+ List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
+ int networkPolicyCount = networkPolicyUriList.size()
+ execution.setVariable(Prefix + "networkPolicyCount", networkPolicyCount)
+ msoLogger.debug(" UPDNETI_networkPolicyCount - " + networkPolicyCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkPolicyCount > 0) {
+ execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList)
+ msoLogger.debug(" networkPolicyUri List - " + networkPolicyUriList)
+
+ String networkPolicies = ""
+ // AII loop call using list vpnBindings
+ for (i in 0..networkPolicyUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using vpnBinding
+ String queryNetworkPolicyAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1) + "?depth=all"
+ } else {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i] + "?depth=all"
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length())
+ println " networkPolicyId - " + networkPolicyId
+ if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') {
+ networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1)
+ }
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId + "?depth=all"
+
+ }
+
+
+ msoLogger.debug(queryNetworkPolicyAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+ msoLogger.debug(" UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String networkPolicy = ""
+ if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+ networkPolicy = utils.getNodeText(aaiResponseAsString, "network-policy-fqdn")
+ networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkPolicy 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 QueryAAINetworkPolicy - " + returnCode
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "networkCollection", networkPolicies)
+ msoLogger.debug(" UPDNETI_networkCollection - " + '\n' + networkPolicies)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <network-policy xmlns="${schemaVersion}">
+ <network-policy-fqdn/>
+ </network-policy>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "networkCollection", "<policyFqdns/>")
+ msoLogger.debug(" No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkTableRef(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTQueryAAINetworkTableRef of DoUpdateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+ msoLogger.debug(" relationship - " + relationship)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
+ int networkTableRefCount = networkTableRefUriList.size()
+ execution.setVariable(Prefix + "networkTableRefCount", networkTableRefCount)
+ msoLogger.debug(" UPDNETI_networkTableRefCount - " + networkTableRefCount)
+
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkTableRefCount > 0) {
+ execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList)
+ msoLogger.debug(" networkTableRefUri List - " + networkTableRefUriList)
+
+ // AII loop call using list vpnBindings
+ String networkTableRefs = ""
+ for (i in 0..networkTableRefUriList.size()-1) {
+
+ int counting = i+1
+
+ // prepare url using tableRef
+ String queryNetworkTableRefAAIRequest = ""
+
+ String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution)
+
+ // Note: By default, the network policy url is found in 'related-link' of the response,
+ // so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+ if (aai_uri == null || aai_uri == "") {
+ // using value of 'related-link' from response
+ if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1) + "?depth=all"
+ } else {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i] + "?depth=all"
+ }
+ } else {
+ // using uri value in URN mapping
+ String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length())
+
+ if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') {
+ networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1)
+ }
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId + "?depth=all"
+
+ }
+
+
+ msoLogger.debug(queryNetworkTableRefAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+ msoLogger.debug(" UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode)
+ msoLogger.debug(" ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString)
+ msoLogger.debug(" QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString)
+
+ String networkTableRef = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+ networkTableRef = utils.getNodeText(aaiResponseAsString, "route-table-reference-fqdn")
+ networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ 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
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "tableRefCollection", networkTableRefs)
+ msoLogger.debug(" UPDNETI_tableRefCollection - " + '\n' + networkTableRefs)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String aaiStubResponse =
+ """ <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <route-table-references xmlns="${schemaVersion}">
+ <route-table-reference-fqdn/>
+ </route-table-references>
+ </rest:payload>"""
+ String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+ execution.setVariable(Prefix + "tableRefCollection", "<routeTableFqdns/>")
+ msoLogger.debug(" No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.debug(" ***** Inside callRESTUpdateContrailAAINetwork of DoUpdateNetworkInstance ***** " )
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
+ String updateNetworkResponse = execution.getVariable(Prefix + "updateNetworkResponse")
+
+ // Prepare url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=all"
+
+ msoLogger.debug(updateContrailAAIUrlRequest)
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+ msoLogger.debug(" UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest)
+
+ //Prepare payload (PUT)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(execution, aai_uri)
+ String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion)
+ String payloadXml = utils.formatXml(payload)
+ msoLogger.debug(payloadXml)
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml)
+ msoLogger.debug(" 'payload' to Update Contrail - " + "\n" + payloadXml)
+
+ 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)
+
+
+ if (returnCode=='200') {
+ msoLogger.debug(aaiUpdateContrailResponseAsString)
+ execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+ msoLogger.debug(" AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString)
+ // Point-of-no-return is set to false, rollback not needed.
+ execution.setVariable(Prefix + "isPONR", true)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ if (aaiUpdateContrailResponseAsString.contains("RESTFault")) {
+ WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution)
+ execution.setVariable("WorkflowException", exceptionObject)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode
+ msoLogger.debug(errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareUpdateNetworkRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareUpdateNetworkRequest of DoUpdateNetworkInstance ")
+
+ try {
+
+ // get variables
+ String requestId = execution.getVariable(Prefix + "requestId")
+ String messageId = execution.getVariable(Prefix + "messageId")
+ String source = execution.getVariable(Prefix + "source")
+
+ String requestInput = execution.getVariable(Prefix + "networkRequest")
+ 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")
+ String tableCollection = execution.getVariable(Prefix + "tableRefCollection")
+ String updateNetworkRequest = networkUtils.UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source )
+ // Format Response
+ String buildUpdateNetworkRequestAsString = utils.formatXml(updateNetworkRequest)
+ buildUpdateNetworkRequestAsString = buildUpdateNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "")
+ msoLogger.debug(buildUpdateNetworkRequestAsString)
+
+ execution.setVariable(Prefix + "updateNetworkRequest", buildUpdateNetworkRequestAsString)
+ msoLogger.debug(" UPDNETI_updateNetworkRequest - " + "\n" + buildUpdateNetworkRequestAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareUpdateNetworkRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside prepareSDNCRequest of DoUpdateNetworkInstance ")
+
+ try {
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String updateNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+
+ String networkId = ""
+ if (utils.nodeExists(updateNetworkInput, "network-id")) {
+ networkId = utils.getNodeText(updateNetworkInput, "network-id")
+ }
+ 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
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, queryAAIResponse, null)
+
+ String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ msoLogger.debug(sndcTopologyUpdateRequesAsString)
+ execution.setVariable(Prefix + "changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString)
+ msoLogger.debug(" UPDNETI_changeAssignSDNCRequest - " + "\n" + sndcTopologyUpdateRequesAsString)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateUpdateNetworkResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside validateUpdateNetworkResponse of DoUpdateNetworkInstance ")
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "updateNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ msoLogger.debug(" Network Adapter update responseCode: " + returnCode)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ msoLogger.debug(networkResponse)
+ execution.setVariable(Prefix + "updateNetworkResponse", networkResponse)
+ msoLogger.debug(" Network Adapter update Success Response - " + "\n" + networkResponse)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ rollbackData = rollbackData.replace("rollback>", "networkRollback>")
+ String rollbackNetwork =
+ """<rollbackNetworkRequest>
+ ${rollbackData}
+ </rollbackNetworkRequest>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ msoLogger.debug(" Network Adapter rollback data - " + "\n" + rollbackNetworkXml)
+
+ } else { // network error
+ if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) { //4xx, 5xx
+ if (networkResponse.contains("updateNetworkError")) {
+ networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+ errorMessage = utils.getNodeText(networkResponse, "message")
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ } else { // CatchAll exception
+ if (returnCode == "500") {
+ errorMessage = "JBWEB000065: HTTP Status 500."
+ } else {
+ errorMessage = "Return code is " + returnCode
+ }
+ errorMessage = "Received error from Network Adapter: " + errorMessage
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+ }
+
+ } else { // CatchAll exception
+ String dataErrorMessage = "Received error from Network Adapter. Return code is: " + returnCode
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. validateUpdateNetworkResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void validateSDNCResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside validateSDNCResponse of DoUpdateNetworkInstance ")
+
+ String response = execution.getVariable(Prefix + "changeAssignSDNCResponse")
+ WorkflowException workflowException = null
+ try {
+ workflowException = execution.getVariable(Prefix + "WorkflowException")
+ //execution.setVariable("WorkflowException", workflowException)
+ } catch (Exception ex) {
+ msoLogger.debug(" Sdnc 'WorkflowException' object is empty or null. ")
+ }
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String changeAssignSDNCResponseDecodeXml = execution.getVariable(Prefix + "changeAssignSDNCResponse")
+ changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ execution.setVariable(Prefix + "changeAssignSDNCResponse", changeAssignSDNCResponseDecodeXml)
+
+ if (execution.getVariable(Prefix + "sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
+ execution.setVariable(Prefix + "isSdncRollbackNeeded", true)
+ msoLogger.debug("Successfully Validated SDNC Response")
+
+ } else {
+ msoLogger.debug("Did NOT Successfully Validated SDNC Response")
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ public void postProcessResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside postProcessResponse of DoUpdateNetworkInstance ")
+
+ try {
+ msoLogger.debug(" ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"))
+ 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
+ execution.setVariable("WorkflowException", null)
+ execution.setVariable(Prefix + "Success", true)
+ msoLogger.debug(" ***** postProcessResponse(), GOOD !!!")
+ } else {
+ 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.
+ msoLogger.debug(" ***** workflowException: " + execution.getVariable("workflowException"))
+ WorkflowException wfex = execution.getVariable("workflowException")
+ exceptionMessage = wfex.getErrorMessage()
+ } else {
+ 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()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void prepareSDNCRollbackRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ 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.
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ // get variables
+ String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ String updateNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String changeAssignSDNCResponse = execution.getVariable(Prefix + "changeAssignSDNCResponse")
+ String networkId = utils.getNodeText(changeAssignSDNCResponse, "network-id")
+
+ String serviceInstanceId = utils.getNodeText(updateNetworkInput, "service-instance-id")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
+ String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+ msoLogger.debug(" Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ 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) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
+ }
+ }
+ 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) {
+ if (rollbackSDNCRequest != "") {
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ }
+ }
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+ if (rollbackNetworkRequest != null) {
+ if (rollbackNetworkRequest != "") {
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ }
+ }
+ 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)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processJavaException(DelegateExecution execution){
+
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.debug("Caught a Java Exception")
+ 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") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.debug("Completed processJavaException Method")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..8a13b3c392
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
@@ -0,0 +1,310 @@
+/*-
+ * ============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 groovy.xml.XmlUtil
+import groovy.json.*
+
+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.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.rest.APIResponse
+
+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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class DoUpdateNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateNetworkInstanceRollback.class);
+
+ String Prefix="UPDNETIR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils(this)
+ NetworkUtils networkUtils = new NetworkUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+ def className = getClass().getSimpleName()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", null)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", null)
+ execution.setVariable(Prefix + "WorkflowException", null)
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ execution.setVariable(Prefix + "rollbackNetworkResponse", "")
+ execution.setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ execution.setVariable(Prefix + "rollbackSDNCRequest", "")
+ execution.setVariable(Prefix + "rollbackSDNCResponse", "")
+ execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DoUpdateNetworkInstanceRollback.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of " + className + ".groovy ")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // GET Incoming request/variables
+ String rollbackNetworkRequest = null
+ String rollbackSDNCRequest = null
+
+ // Partial Rollback
+ Map<String, String> rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData != null && rollbackData instanceof Map) {
+
+ if(rollbackData.containsKey("rollbackNetworkRequest")) {
+ rollbackNetworkRequest = rollbackData["rollbackNetworkRequest"]
+ }
+
+ if(rollbackData.containsKey("rollbackSDNCRequest")) {
+ rollbackSDNCRequest = rollbackData["rollbackSDNCRequest"]
+ }
+ }
+
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkRequest)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", rollbackSDNCRequest)
+ msoLogger.debug("'rollbackData': " + '\n' + execution.getVariable("rollbackData"))
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion? : " + sdncVersion)
+
+ // 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()
+ msoLogger.debug(dataErrorMessage )
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ if (execution.getVariable("SavedWorkflowException1") != null) {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
+ } else {
+ execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
+ }
+ msoLogger.debug("*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"))
+ if(execution.getVariable(Prefix + "WorkflowException") != null) {
+ // called by: DoCreateNetworkInstance, partial rollback
+ execution.setVariable(Prefix + "fullRollback", false)
+
+ } else {
+ // called by: Macro - Full Rollback, WorkflowException = null
+ execution.setVariable(Prefix + "fullRollback", true)
+
+ }
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+
+
+ } 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)
+
+ }
+
+ }
+
+ public void validateRollbackResponses (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside validateRollbackResponses() of DoUpdateNetworkInstanceRollback ")
+
+ try {
+ // validate PO network rollback response
+ String rollbackNetworkErrorMessages = ""
+ String rollbackNetworkReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackNetworkRequest") != null) {
+ rollbackNetworkReturnCode = execution.getVariable(Prefix + "rollbackNetworkReturnCode")
+ String rollbackNetworkResponse = execution.getVariable(Prefix + "rollbackNetworkResponse")
+ msoLogger.debug(" NetworkRollback Code - " + rollbackNetworkReturnCode)
+ msoLogger.debug(" NetworkRollback Response - " + rollbackNetworkResponse)
+ if (rollbackNetworkReturnCode != "200") {
+ rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+ } else {
+ rollbackNetworkErrorMessages = " + PO Network rollback completed."
+ }
+ }
+
+ // validate SDNC rollback response
+ String rollbackSdncErrorMessages = ""
+ String rollbackSDNCReturnCode = "200"
+ if (execution.getVariable(Prefix + "rollbackSDNCRequest") != null) {
+ rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
+ String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
+ String rollbackSDNCReturnInnerCode = ""
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText(rollbackSDNCResponse, "response-code")
+ if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+ rollbackSdncErrorMessages = " + SNDC changeassign rollback completed."
+ } else {
+ rollbackSdncErrorMessages = " + SDNC changeassign rollback failed. "
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SNDC changeassign rollback completed."
+ }
+ } else {
+ rollbackSdncErrorMessages = " + SDNC changeassign rollback failed. "
+ }
+ msoLogger.debug(" SDNC changeassign rollback Code - " + rollbackSDNCReturnCode)
+ msoLogger.debug(" SDNC changeassign rollback Response - " + rollbackSDNCResponse)
+ }
+
+ String statusMessage = ""
+ int errorCode = 7000
+ msoLogger.debug("*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"))
+ if (execution.getVariable(Prefix + "fullRollback") == false) {
+ // original WorkflowException,
+ WorkflowException wfe = execution.getVariable(Prefix + "WorkflowException")
+ if (wfe != null) {
+ // rollback due to failure in DoCreate - Partial rollback
+ statusMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ statusMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ errorCode = '7000'
+ }
+
+ // set if all rolledbacks are successful
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rolledBack", true)
+
+ } else {
+ execution.setVariable("rolledBack", false)
+
+ }
+
+ statusMessage = statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+ msoLogger.debug("Final DoUpdateNetworkInstanceRollback status message: " + statusMessage)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, errorCode, statusMessage);
+ execution.setVariable("workflowException", exception);
+
+ } else {
+ // rollback due to failures in Main flow (Macro) - Full rollback
+ // WorkflowException = null
+ if (rollbackNetworkReturnCode == "200" && rollbackSDNCReturnCode == "200") {
+ execution.setVariable("rollbackSuccessful", true)
+ execution.setVariable("rollbackError", false)
+ } else {
+ String exceptionMessage = "Network Update Rollback was not Successful. "
+ msoLogger.debug(exceptionMessage)
+ execution.setVariable("rollbackSuccessful", false)
+ execution.setVariable("rollbackError", true)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ } catch (Exception ex) {
+ execution.setVariable("WorkflowException", null)
+ String errorMessage = "See Previous Camunda flows for cause of Error: Undetermined Exception."
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstanceRollback flow. validateRollbackResponses() - " + errorMessage + ": " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ execution.setVariable("WorkflowException", execution.getVariable("WorkflowException"))
+
+ }
+
+ }
+
+ // *******************************
+ // 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.trace("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
new file mode 100644
index 0000000000..451e0293ef
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -0,0 +1,1040 @@
+/*-
+ * ============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.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.common.scripts.VfModule
+import org.onap.so.bpmn.common.scripts.VfModuleBase
+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.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.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+public class DoUpdateVfModule extends VfModuleBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateVfModule.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils catalog = new CatalogDbUtils()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'DOUPVfMod_')
+ execution.setVariable('DOUPVfMod_requestInfo', null)
+ execution.setVariable('DOUPVfMod_serviceInstanceId', null)
+ execution.setVariable('DOUPVfMod_requestId', null)
+ execution.setVariable('DOUPVfMod_vnfInputs', null)
+ execution.setVariable('DOUPVfMod_vnfId', null)
+ execution.setVariable('DOUPVfMod_vnfName', null)
+ execution.setVariable('DOUPVfMod_vnfNameFromAAI', null)
+ execution.setVariable('DOUPVfMod_vfModuleName', null)
+ execution.setVariable('DOUPVfMod_vfModuleId', null)
+ execution.setVariable('DOUPVfMod_vnfType', null)
+ execution.setVariable('DOUPVfMod_asdcServiceModelVersion', null)
+ execution.setVariable('DOUPVfMod_vfModuleModelName', null)
+ execution.setVariable('DOUPVfMod_modelCustomizationUuid', null)
+ execution.setVariable("DOUPVfMod_isBaseVfModule", "false")
+ execution.setVariable('DOUPVfMod_serviceId', null)
+ execution.setVariable('DOUPVfMod_aicCloudRegion', null)
+ execution.setVariable('DOUPVfMod_tenantId', null)
+ execution.setVariable('DOUPVfMod_volumeGroupId', null)
+ execution.setVariable("DOUPVfMod_volumeGroupStackId", "")
+ execution.setVariable('DOUPVfMod_vfModule', null)
+ execution.setVariable('DOUPVfMod_vnfParams', null)
+ execution.setVariable("DOUPVfMod_baseVfModuleId", "")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", "")
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', null)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignResponse', null)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', null)
+ execution.setVariable('DOUPVfMod_sdncActivateResponse', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', null)
+ execution.setVariable('DOUPVfMod_sdncTopologyResponse', null)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', null)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', null)
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', false)
+ execution.setVariable('DoUpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ initProcessVariables(execution)
+ def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
+ msoLogger.debug("DoUpdateVfModule request: " + xml)
+ msoLogger.debug('Received request xml:\n' + xml)
+
+ if (xml == null || xml.isEmpty()) {
+ // Building Block-type request
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ msoLogger.debug("serviceModelInfo: " + serviceModelInfo)
+ String modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ msoLogger.debug("modelInvariantUuid: " + modelInvariantUuid)
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ //tenantId
+ def tenantId = execution.getVariable("tenantId")
+ execution.setVariable("DOUPVfMod_tenantId", tenantId)
+
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("volumeGroupId")
+ execution.setVariable("DOUPVfMod_volumeGroupId", volumeGroupId)
+
+ //cloudSiteId
+ def cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("DOUPVfMod_aicCloudRegion", cloudSiteId)
+
+ msoLogger.debug("cloudSiteId: " + cloudSiteId)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DOUPVfMod_vnfType", vnfType)
+
+ msoLogger.debug("vnfType: " + vnfType)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DOUPVfMod_vnfName", vnfName)
+
+ msoLogger.debug("vnfName: " + vnfName)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DOUPVfMod_vnfId", vnfId)
+
+ msoLogger.debug("vnfId: " + vnfId)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DOUPVfMod_vfModuleName", vfModuleName)
+
+ msoLogger.debug("vfModuleName: " + vfModuleName)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("DOUPVfMod_vfModuleModelName", vfModuleModelName)
+
+ msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
+ if (modelCustomizationUuid == null) {
+ modelCustomizationUuid = ""
+ }
+ execution.setVariable("DOUPVfMod_modelCustomizationUuid", modelCustomizationUuid)
+
+ msoLogger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DOUPVfMod_vfModuleId", vfModuleId)
+ msoLogger.debug("vfModuleId: " + vfModuleId)
+ def requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("DOUPVfMod_requestId", requestId)
+ msoLogger.debug("requestId: " + requestId)
+ // Set mso-request-id to request-id for VNF Adapter interface
+ execution.setVariable("mso-request-id", requestId)
+ //serviceId
+ def serviceId = execution.getVariable("serviceId")
+ execution.setVariable("DOUPVfMod_serviceId", serviceId)
+ msoLogger.debug("serviceId: " + serviceId)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DOUPVfMod_serviceInstanceId", serviceInstanceId)
+
+ msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DOUPVfMod_source", source)
+
+ msoLogger.debug("source: " + source)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback.equals("true")) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+ msoLogger.debug("backoutOnFailure: " + backoutOnFailure)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DOUPVfMod_asdcServiceModelVersion", asdcServiceModelVersion)
+ msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
+ //personaModelId
+ execution.setVariable("DOUPVfMod_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantUuid"))
+ //personaModelVersion
+ execution.setVariable("DOUPVfMod_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersion"))
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DOUPVfMod_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ msoLogger.debug("Generated messageId (UUID) is: " + uuid)
+ }else{
+ msoLogger.debug("Found messageId (UUID) is: " + uuid)
+ }
+ //isVidRequest
+ String isVidRequest = execution.getVariable("isVidRequest")
+ // default to true
+ if (isVidRequest == null || isVidRequest.isEmpty()) {
+ execution.setVariable("isVidRequest", "true")
+ }
+ //usePreload
+ def usePreload = execution.getVariable("usePreload")
+ execution.setVariable("DOUPVfMod_usePreload", usePreload)
+ msoLogger.debug("usePreload: " + usePreload)
+ //globalSubscriberId
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ execution.setVariable("DOUPVfMod_globalSubscriberId", globalSubscriberId)
+ msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
+ //vnfQueryPath
+ String vnfQueryPath = execution.getVariable("vnfQueryPath")
+ execution.setVariable("DOUPVfMod_vnfQueryPath", vnfQueryPath)
+ msoLogger.debug("vnfQueryPath: " + vnfQueryPath)
+
+ Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams")
+ if (vfModuleInputParams != null) {
+ execution.setVariable("DOUPVfMod_vnfParamsMap", vfModuleInputParams)
+ }
+ //get workload and environment context from parent SI
+ String environmentContext = ""
+ String workloadContext =""
+ String serviceType =""
+
+ try{
+ String json = catalog.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
+ serviceType = jsonUtil.getJsonValue(json, "serviceResources.serviceType")
+ }catch(BpmnError e){
+ throw e
+ } catch (Exception ex){
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ try{
+ AAIUri serviceInstanceURI = AAIUriFactory.create(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,serviceType,serviceInstanceId)
+ AAIResourcesClient aaiRC = new AAIResourcesClient()
+ AAIResultWrapper aaiRW = aaiRC.get(serviceInstanceURI)
+ Map<String, Object> aaiJson = aaiRW.asMap()
+ environmentContext = aaiJson.getOrDefault("environment-context","")
+ workloadContext = aaiJson.getOrDefault("workload-context","")
+
+ }catch (Exception ex) {
+ msoLogger.debug("Error retreiving parent service instance information")
+ }
+
+ execution.setVariable("DCVFM_environmentContext",environmentContext)
+ execution.setVariable("DCVFM_workloadContext",workloadContext)
+ }
+ else {
+
+ def requestInfo = getRequiredNodeXml(execution, xml, 'request-info')
+ execution.setVariable('DOUPVfMod_requestInfo', requestInfo)
+ execution.setVariable('DOUPVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ def serviceInstanceId = execution.getVariable('mso-service-instance-id')
+ if (serviceInstanceId == null) {
+ serviceInstanceId = ''
+ }
+ execution.setVariable('DOUPVfMod_serviceInstanceId', serviceInstanceId)
+
+ def vnfInputs = getRequiredNodeXml(execution, xml, 'vnf-inputs')
+ execution.setVariable('DOUPVfMod_vnfInputs', vnfInputs)
+ execution.setVariable('DOUPVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('DOUPVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('DOUPVfMod_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+ execution.setVariable('DOUPVfMod_vnfType', getNodeTextForce(vnfInputs, 'vnf-type'))
+ execution.setVariable('DOUPVfMod_vnfName', getNodeTextForce(vnfInputs, 'vnf-name'))
+ execution.setVariable('DOUPVfMod_asdcServiceModelVersion', getNodeTextForce(vnfInputs, 'asdc-service-model-version'))
+ execution.setVariable('DOUPVfMod_vfModuleModelName', getRequiredNodeText(execution, vnfInputs, 'vf-module-model-name'))
+ execution.setVariable('DOUPVfMod_modelCustomizationUuid', getNodeTextForce(vnfInputs, 'model-customization-id'))
+ execution.setVariable('DOUPVfMod_serviceId', getRequiredNodeText(execution, vnfInputs, 'service-id'))
+ execution.setVariable('DOUPVfMod_aicCloudRegion', getRequiredNodeText(execution, vnfInputs, 'aic-cloud-region'))
+ execution.setVariable('DOUPVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ //isBaseVfModule
+ def isBaseVfModule = "false"
+ if (utils.nodeExists(xml, "is-base-vf-module")) {
+ isBaseVfModule = utils.getNodeText(xml, "is-base-vf-module")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ }
+ msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution, xml)
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+
+ def String vgi = getNodeTextForce(vnfInputs, 'volume-group-id')
+ execution.setVariable('DOUPVfMod_volumeGroupId', vgi)
+
+ execution.setVariable('DOUPVfMod_vnfParams', utils.getNodeXml(xml, 'vnf-params', false))
+ }
+
+ def sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the PrepareUpdateAAIVfModule subflow. This will
+ * set the orchestration-status to 'pending-update'.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepPrepareUpdateAAIVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preparePrepareUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def orchestrationStatus = 'pending-update'
+
+ String prepareUpdateAAIVfModuleRequest = """
+ <PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <orchestration-status>${MsoUtils.xmlEscape(orchestrationStatus)}</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>
+ """
+ prepareUpdateAAIVfModuleRequest = utils.formatXml(prepareUpdateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', prepareUpdateAAIVfModuleRequest)
+ msoLogger.debug("DoUpdateAAIVfModule request: " + prepareUpdateAAIVfModuleRequest)
+ msoLogger.debug('Request for PrepareUpdateAAIVfModule:\n' + prepareUpdateAAIVfModuleRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the ConfirmVolumeGroupTenant subflow.
+ * Determine cloud region id for the volume group.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepConfirmVolumeGroupTenant(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepConfirmVolumeGroupTenant(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ def prefix = execution.getVariable("prefix")
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ String cloudRegion = execution.getVariable(prefix + "aicCloudRegion")
+
+ // Prepare AA&I url
+ String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ msoLogger.debug("CloudRegion Request: " + queryCloudRegionRequest)
+
+ execution.setVariable(prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ msoLogger.debug(prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest)
+
+ cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "AAI", cloudRegion)
+
+ if ((cloudRegion != "ERROR")) {
+ if(execution.getVariable(prefix + "queryCloudRegionReturnCode") == "404"){
+ execution.setVariable(prefix + "cloudRegionForVolume", "AAIAIC25")
+ }else{
+ execution.setVariable(prefix + "cloudRegionForVolume", cloudRegion)
+ }
+ execution.setVariable(prefix + "isCloudRegionGood", true)
+ } else {
+ String errorMessage = "AAI Query Cloud Region Unsuccessful. AAI Response Code: " + execution.getVariable(prefix + "queryCloudRegionReturnCode")
+ msoLogger.debug(errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ execution.setVariable(prefix + "isCloudRegionGood", false)
+ }
+ msoLogger.debug(" is Cloud Region Good: " + execution.getVariable(prefix + "isCloudRegionGood"))
+
+ } catch(BpmnError b){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + b);
+ throw b
+ }catch (Exception e) {
+ // try error
+ String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " AAI Query Cloud Region Failed. Exception - " + "\n" + errorMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during prepConfirmVolumeGroupTenant(): " + e.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'changeassign' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyChg(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyChg(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DOUPVfMod_requestId") + "-" + System.currentTimeMillis()
+ }
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def vfModuleName = vfModule.getElementText('vf-module-name')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+ boolean usePreload = execution.getVariable("DOUPVfMod_usePreload")
+ String usePreloadToSDNC = usePreload ? "Y" : "N"
+ def modelCustomizationUuid = execution.getVariable("DoUPVfMod_modelCustomizationUuid")
+ def modelCustomizationUuidString = ""
+ if (!usePreload) {
+ modelCustomizationUuidString = "<modelCustomizationUuid>" + modelCustomizationUuid + "</modelCustomizationUuid>"
+ }
+
+ // Retrieve vnf name from AAI response
+ def vnfName = execution.getVariable('DOUPVfMod_vnfNameFromAAI')
+ execution.setVariable('DOUPVfMod_vnfName', vnfName)
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(vnfId)}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vfModuleId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vnf-type>
+ <vnf-name>${MsoUtils.xmlEscape(vfModuleName)}</vnf-name>
+ <generic-vnf-id>${MsoUtils.xmlEscape(vnfId)}</generic-vnf-id>
+ <generic-vnf-name>${MsoUtils.xmlEscape(vnfName)}</generic-vnf-name>
+ <generic-vnf-type>${MsoUtils.xmlEscape(vnfType)}</generic-vnf-type>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudRegion)}</aic-cloud-region>
+ ${modelCustomizationUuidString}
+ <use-preload>${MsoUtils.xmlEscape(usePreloadToSDNC)}</use-preload>
+ ${vnfNetworks}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', sdncTopologyRequest)
+ msoLogger.debug("sdncChangeAssignRequest : " + sdncTopologyRequest)
+ msoLogger.debug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyChg(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'query' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyQuery(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyQuery(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DOUPVfMod_requestId") + "-" + System.currentTimeMillis()
+ }
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+ def svcInstId = ""
+ if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+ svcInstId = vfModuleId
+ }
+ else {
+ svcInstId = serviceInstanceId
+ }
+
+ //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+ sleep(5000)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+ msoLogger.debug("sdncTopologyRequest : " + sdncTopologyRequest)
+ msoLogger.debug('Request for SDNCAdapter query:\n' + sdncTopologyRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyQuery(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleName = execution.getVariable('DOUPVfMod_vfModuleName')
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+ def volumeGroupStackId = execution.getVariable('DOUPVfMod_volumeGroupStackId')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def heatStackId = vfModule.getElementText('heat-stack-id')
+ def cloudId = execution.getVariable('DOUPVfMod_aicCloudRegion')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vnfName = execution.getVariable('DOUPVfMod_vnfName')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def baseVfModuleId = execution.getVariable("DOUPVfMod_baseVfModuleId")
+ def baseVfModuleStackId = execution.getVariable("DOUPVfMod_baseVfModuleHeatStackId")
+ def asdcServiceModelVersion = execution.getVariable('DOUPVfMod_asdcServiceModelVersion')
+ def modelCustomizationUuid = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ def backoutOnFailure = execution.getVariable("DOUPVfMod_backoutOnFailure")
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String environmentContext = execution.getVariable("DOUPVEnvironment_context")
+ String workloadContext = execution.getVariable("DOUPVWorkload_context")
+ msoLogger.debug("workloadContext: " + workloadContext)
+ msoLogger.debug("environmentContext: " + environmentContext)
+
+ Map<String, String> vnfParamsMap = execution.getVariable("DOUPVfMod_vnfParamsMap")
+
+ String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
+
+ String vfModuleParams = buildVfModuleParams(vnfParamsMap, sdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, null, environmentContext, workloadContext)
+
+
+ String vnfAdapterRestRequest = """
+ <updateVfModuleRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(cloudId)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
+ <vfModuleStackId>${MsoUtils.xmlEscape(heatStackId)}</vfModuleStackId>
+ <vnfType>${MsoUtils.xmlEscape(vnfType)}</vnfType>
+ <vnfVersion>${MsoUtils.xmlEscape(asdcServiceModelVersion)}</vnfVersion>
+ <modelCustomizationUuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</modelCustomizationUuid>
+ <vfModuleType>${MsoUtils.xmlEscape(vfModuleModelName)}</vfModuleType>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupStackId)}</volumeGroupStackId>
+ <baseVfModuleId>${MsoUtils.xmlEscape(baseVfModuleId)}</baseVfModuleId>
+ <baseVfModuleStackId>${MsoUtils.xmlEscape(baseVfModuleStackId)}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${MsoUtils.xmlEscape(backoutOnFailure)}</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </updateVfModuleRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ msoLogger.debug("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
+ msoLogger.debug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+
+ def personaModelId = utils.getNodeText(vnfInputs, 'vnf-persona-model-id')
+ def personaModelVersion = utils.getNodeText(vnfInputs, 'vnf-persona-model-version')
+ if ((personaModelId == null) || (personaModelVersion == null)) {
+ msoLogger.debug("Skipping update for Generic VNF ' + vnfId + ' because either \'vnf-persona-model-id\' or \'vnf-persona-model-version\' is absent")
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', true)
+ } else {
+ def personaModelIdElement = '<model-invariant-id>' + personaModelId + '</model-invariant-id>'
+ def personaModelVersionElement = '<model-version-id>' + personaModelVersion + '</model-version-id>'
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIVfModule subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def orchestrationStatus = 'updated'
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+
+ def volumeGroupIdElement = ''
+ def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+ if (volumeGroupId != null) {
+ volumeGroupIdElement = '<volume-group-id>' + volumeGroupId + '</volume-group-id>'
+ }
+ def personaModelIdElement = ''
+ def personaModelId = utils.getNodeText(vnfInputs, 'persona-model-id')
+ if (personaModelId != null) {
+ personaModelIdElement = '<model-invariant-id>' + personaModelId + '</model-invariant-id>'
+ }
+ def personaModelVersionElement = ''
+ def personaModelVersion = utils.getNodeText(vnfInputs, 'persona-model-version')
+ if (personaModelVersion != null) {
+ personaModelVersionElement = '<model-version-id>' + personaModelVersion + '</model-version-id>'
+ }
+ def contrailServiceInstanceFqdnElement = ''
+ def contrailServiceInstanceFqdn = utils.getNodeText(vnfInputs, 'contrail-service-instance-fqdn')
+ if (contrailServiceInstanceFqdn != null) {
+ contrailServiceInstanceFqdnElement = '<contrail-service-instance-fqdn>' + contrailServiceInstanceFqdn + '</contrail-service-instance-fqdn>'
+ }
+ def personaModelCustomizationIdElement = ''
+ def modelCustomizationId = execution.getVariable('DOUPVfMod_modelCustomizationUuid')
+ if (modelCustomizationId != null) {
+ personaModelCustomizationIdElement = '<model-customization-id>' + modelCustomizationId + '</model-customization-id>'
+ }
+
+ String updateAAIVfModuleRequest = """
+ <UpdateAAIVfModuleRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <orchestration-status>${MsoUtils.xmlEscape(orchestrationStatus)}</orchestration-status>
+ ${volumeGroupIdElement}
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ ${contrailServiceInstanceFqdnElement}
+ ${personaModelCustomizationIdElement}
+ </UpdateAAIVfModuleRequest>
+ """
+
+ msoLogger.debug('Unformatted updateAAIVfModuleRequest: ' + updateAAIVfModuleRequest)
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
+ msoLogger.debug("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
+ msoLogger.debug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the SDNC Adapter subflow to perform
+ * a VNF topology 'activate' operation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepSDNCTopologyAct(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyAct(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("DOUPVfMod_requestId") + "-" + System.currentTimeMillis()
+ }
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfName = execution.getVariable('DOUPVfMod_vnfName')
+ def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+ def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+ def vfModuleName = vfModule.getElementText('vf-module-name')
+ def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+ def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+
+ boolean usePreload = execution.getVariable("DOUPVfMod_usePreload")
+ String usePreloadToSDNC = usePreload ? "Y" : "N"
+ def modelCustomizationUuid = execution.getVariable("DoUPVfMod_modelCustomizationUuid")
+ def modelCustomizationUuidString = ""
+ if (!usePreload) {
+ modelCustomizationUuidString = "<modelCustomizationUuid>" + modelCustomizationUuid + "</modelCustomizationUuid>"
+ }
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${MsoUtils.xmlEscape(serviceId)}</service-type>
+ <service-instance-id>${MsoUtils.xmlEscape(vnfId)}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${MsoUtils.xmlEscape(vfModuleId)}</vnf-id>
+ <vnf-type>${MsoUtils.xmlEscape(vfModuleModelName)}</vnf-type>
+ <vnf-name>${MsoUtils.xmlEscape(vfModuleName)}</vnf-name>
+ <generic-vnf-id>${MsoUtils.xmlEscape(vnfId)}</generic-vnf-id>
+ <generic-vnf-name>${MsoUtils.xmlEscape(vnfName)}</generic-vnf-name>
+ <generic-vnf-type>${MsoUtils.xmlEscape(vnfType)}</generic-vnf-type>
+ <tenant>${MsoUtils.xmlEscape(tenantId)}</tenant>
+ <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudRegion)}</aic-cloud-region>
+ ${modelCustomizationUuidString}
+ <use-preload>${MsoUtils.xmlEscape(usePreloadToSDNC)}</use-preload>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', sdncTopologyRequest)
+ msoLogger.debug("sdncActivateRequest : " + sdncTopologyRequest)
+ msoLogger.debug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepSDNCTopologyAct(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Log a WorkflowException that has been created.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleWorkflowException(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.handleWorkflowException(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, method + ' caught WorkflowException: ' + workflowException.getErrorMessage(), "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
+ }
+ }
+
+ public void validateSDNCResponse(DelegateExecution execution, String response, String method){
+
+ def prefix = execution.getVariable("prefix")
+
+ msoLogger.trace("STARTED ValidateSDNCResponse Process")
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ msoLogger.debug("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ msoLogger.debug("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse)
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ msoLogger.debug("AAI endPoint: " + endPoint)
+
+ try {
+ def aaiRequestId = UUID.randomUUID().toString()
+ msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ msoLogger.debug("createVfModule - invoking httpGet() to AAI")
+
+ def responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ msoLogger.debug("createVfModule - queryAAIVfModule Response: " + responseData)
+ msoLogger.debug("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find base module info')
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+ if (isBaseVfModule == "true") {
+ String baseModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
+ msoLogger.debug('Received baseVfModuleId: ' + baseModuleId)
+ String baseModuleHeatStackId = utils.getNodeText(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
+ msoLogger.debug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId)
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
new file mode 100644
index 0000000000..34a73bd35c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -0,0 +1,414 @@
+/*-
+ * ============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.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+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.MsoUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ModuleResource
+import org.onap.so.bpmn.core.domain.VnfResource
+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.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This class supports the VID Flow
+ * with the update of a generic vnf and related VF modules.
+ */
+class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateVnfAndModules.class);
+
+ String Prefix="DUVAM_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+ msoLogger.trace("STARTED DoUpdateVnfAndModules PreProcessRequest Process")
+
+ try{
+ // Get Variables
+
+ String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ msoLogger.debug("Incoming Request Id is: " + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
+
+ String vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("Incoming Vnf Id is: " + vnfId)
+
+ String source = "VID"
+ execution.setVariable("DUVAM_source", source)
+ msoLogger.debug("Incoming Source is: " + source)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1702"
+ }
+ execution.setVariable("DUVAM_sdncVersion", sdncVersion)
+ msoLogger.debug("Incoming Sdnc Version is: " + sdncVersion)
+
+ VnfResource vnfResource = (VnfResource) execution.getVariable("vnfResourceDecomposition")
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DUVAM_serviceId", serviceId)
+ msoLogger.debug("Incoming Service Id is: " + serviceId)
+
+ String modelUuid = jsonUtil.getJsonValue(vnfModelInfo, "modelUuid")
+ execution.setVariable("DUVAM_modelUuid", modelUuid)
+ msoLogger.debug("Incoming modelUuid is: " + modelUuid)
+
+ String modelCustomizationUuid = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationUuid")
+ execution.setVariable("DUVAM_modelCustomizationUuid", modelCustomizationUuid)
+ msoLogger.debug("Incoming Model Customization Uuid is: " + modelCustomizationUuid)
+
+ String cloudSiteId = execution.getVariable("lcpCloudRegionId")
+ execution.setVariable("DUVAM_cloudSiteId", cloudSiteId)
+ msoLogger.debug("Incoming Cloud Site Id is: " + cloudSiteId)
+
+ String tenantId = execution.getVariable("tenantId")
+ execution.setVariable("DUVAM_tenantId", tenantId)
+ msoLogger.debug("Incoming Tenant Id is: " + tenantId)
+
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if (globalSubscriberId == null) {
+ globalSubscriberId = ""
+ }
+ execution.setVariable("DUVAM_globalSubscriberId", globalSubscriberId)
+ msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
+
+ execution.setVariable("DUVAM_moduleCount", 0)
+ execution.setVariable("DUVAM_nextModule", 0)
+
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ }catch(Exception e){
+ msoLogger.debug(" Error Occured in DoUpdateVnfAndModules PreProcessRequest method!" + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoUpdateVnfAndModules PreProcessRequest")
+
+ }
+ msoLogger.trace("COMPLETED DoUpdateVnfAndModules PreProcessRequest Process ")
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+ * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIVfModule(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.queryAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ msoLogger.debug('AAI URI is: ' + aai_uri)
+
+ String endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ msoLogger.debug("AAI endPoint: " + endPoint)
+
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def aaiRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', aaiRequestId).
+ addHeader('X-FromAppId', 'MSO').
+ addHeader('Content-Type', 'application/xml').
+ addHeader('Accept','application/xml');
+ msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+ APIResponse response = client.httpGet()
+ msoLogger.debug("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received generic VNF data: " + responseData)
+
+ }
+
+ msoLogger.debug("createVfModule - queryAAIVfModule Response: " + responseData)
+ msoLogger.debug("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DUVAM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DUVAM_queryAAIVfModuleResponse', responseData)
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ //Map<String, String>[] vfModules = new HashMap<String,String>[]
+ def vfModulesList = new ArrayList<Map<String,String>>()
+ def vfModules = null
+ def vfModuleBaseEntry = null
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ msoLogger.debug('Parsing the VNF data to find base module info')
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ msoLogger.debug("vModulesText: " + vfModulesText)
+ if (vfModulesText != null && !vfModulesText.trim().isEmpty()) {
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ execution.setVariable("DUVAM_moduleCount", vfModules.size())
+ int vfModulesSize = 0
+ for (i in 0..vfModules.size()-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+
+ Map<String, String> vfModuleEntry = new HashMap<String, String>()
+ def vfModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
+ vfModuleEntry.put("vfModuleId", vfModuleId)
+ def vfModuleName = utils.getNodeText(vfModuleXml, "vf-module-name")
+ vfModuleEntry.put("vfModuleName", vfModuleName)
+ def modelInvariantUuid = utils.getNodeText(vfModuleXml, "model-invariant-id")
+ vfModuleEntry.put("modelInvariantUuid", modelInvariantUuid)
+ def modelUuid = utils.getNodeText(vfModuleXml, "model-version-id")
+ vfModuleEntry.put("modelUuid", modelUuid)
+ def modelCustomizationUuid = utils.getNodeText(vfModuleXml, "model-customization-id")
+ vfModuleEntry.put("modelCustomizationUuid", modelCustomizationUuid)
+
+ def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+ vfModuleEntry.put("isBaseVfModule", isBaseVfModule)
+
+ String volumeGroupId = ''
+
+ msoLogger.debug("Next module!")
+ def vfModuleRelationships = vfModules[i].'**'.findAll {it.name() == 'relationship-data'}
+ if (vfModuleRelationships.size() > 0) {
+ for (j in 0..vfModuleRelationships.size()-1) {
+ if (vfModuleRelationships[j] != null) {
+
+ def relationshipKey = vfModuleRelationships[j].'**'.findAll {it.name() == 'relationship-key'}
+
+ if (relationshipKey[0] == 'volume-group.volume-group-id') {
+ def relationshipValue = vfModuleRelationships[j].'**'.findAll {it.name() == 'relationship-value'}
+ volumeGroupId = relationshipValue[0]
+ break
+ }
+ }
+ }
+ }
+
+ vfModuleEntry.put("volumeGroupId", volumeGroupId)
+ msoLogger.debug("volumeGroupId is: " + volumeGroupId)
+
+ // Save base vf module to add it to the start of the list later
+ if (isBaseVfModule == "true") {
+ vfModuleBaseEntry = vfModuleEntry
+ }
+ else {
+ vfModulesList.add(vfModuleEntry)
+ }
+ }
+ // Start the list with the base module if any
+ if (vfModuleBaseEntry != null) {
+ vfModulesList.add(0, vfModuleBaseEntry)
+ }
+ }
+
+ }
+ }
+ else {
+ msoLogger.debug('Response code from AAI GET is: ' + response.getStatusCode())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Response code from AAI GET is: ' + response.getStatusCode())
+ }
+ execution.setVariable("DUVAM_vfModules", vfModulesList)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ public void prepareNextModuleToUpdate(DelegateExecution execution){
+
+ execution.setVariable("prefix", Prefix)
+ msoLogger.trace("STARTED prepareNextModuleToUpdate ")
+
+ try {
+ int i = execution.getVariable("DUVAM_nextModule")
+ def vfModules = execution.getVariable("DUVAM_vfModules")
+ def vfModule = vfModules[i]
+
+ def vfModuleId = vfModule.get("vfModuleId")
+ execution.setVariable("DUVAM_vfModuleId", vfModuleId)
+
+ def vfModuleName = vfModule.get("vfModuleName")
+ execution.setVariable("DUVAM_vfModuleName", vfModuleName)
+
+ def isBaseVfModule = vfModule.get("isBaseVfModule")
+ execution.setVariable("DUVAM_isBaseVfModule", isBaseVfModule)
+
+ String modelInvariantUuid = vfModule.get("modelInvariantUuid")
+ msoLogger.debug("ModelInvariantUuid: " + modelInvariantUuid)
+
+ def volumeGroupId = vfModule.get("volumeGroupId")
+ execution.setVariable("DUVAM_volumeGroupId", volumeGroupId)
+
+ execution.setVariable("DUVAM_volumeGroupName", "")
+
+ 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
+ }
+
+ }
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareNextModuleToUpdate Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED prepareNextModuleToUpdate ")
+ }
+
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+ VnfResource vnfResource = (VnfResource) execution.getVariable("vnfResourceDecomposition")
+ ModelInfo vnfDecompModelInfo = vnfResource.getModelInfo()
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String modelUuid = execution.getVariable("DUVAM_modelUuid")
+ if (modelUuid == null || modelUuid.isEmpty()) {
+ modelUuid = vnfDecompModelInfo.getModelUuid()
+ }
+ String modelCustomizationUuid = execution.getVariable("DUVAM_modelCustomizationUuid")
+ if (modelCustomizationUuid == null || modelCustomizationUuid.isEmpty()) {
+ modelCustomizationUuid = vnfDecompModelInfo.getModelCustomizationUuid()
+ }
+ String nfType = vnfResource.getNfType()
+ String nfTypeString = ''
+ if (nfType != null && !nfType.isEmpty()) {
+ nfTypeString = "<nf-type>" + nfType + "</nf-type>"
+ }
+ String nfRole = vnfResource.getNfRole()
+ String nfRoleString = ''
+ if (nfRole != null && !nfRole.isEmpty()) {
+ nfRoleString = "<nf-role>" + nfRole + "</nf-role>"
+ }
+ String nfFunction = vnfResource.getNfFunction()
+ String nfFunctionString = ''
+ if (nfFunction != null && !nfFunction.isEmpty()) {
+ nfFunctionString = "<nf-function>" + nfFunction + "</nf-function>"
+ }
+ String nfNamingCode = vnfResource.getNfNamingCode()
+ String nfNamingCodeString = ''
+ if (nfNamingCode != null && !nfNamingCode.isEmpty()) {
+ nfNamingCodeString = "<nf-naming-code>" + nfNamingCode + "</nf-naming-code>"
+ }
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <model-customization-id>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-id>
+ ${nfTypeString}
+ ${nfRoleString}
+ ${nfFunctionString}
+ ${nfNamingCodeString}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DUVAM_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ msoLogger.debug("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * APP-C Call - placeholder.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void callAppCf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.callAppC(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
new file mode 100644
index 0000000000..4deb53f0ce
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.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.apache.commons.lang3.*
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+
+public class HealthCheckActivate extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, HealthCheckActivate.class);
+
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ }
+
+
+ /**
+ * Sends the synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(DelegateExecution execution) {
+ def status = execution.getVariable("healthyStatus")
+ def healthcheckmessage = execution.getVariable("healthcheckmessage")
+ if (status == "true") {
+ sendWorkflowResponse(execution, 200, healthcheckmessage)
+ }else{
+ sendWorkflowResponse(execution, 503, healthcheckmessage)
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
new file mode 100644
index 0000000000..8673ee7662
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
@@ -0,0 +1,611 @@
+/*-
+ * ============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.onap.appc.client.lcm.model.Action;
+import org.onap.appc.client.lcm.model.Status
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.*
+import org.onap.so.client.appc.ApplicationControllerOrchestrator
+import org.onap.so.client.appc.ApplicationControllerSupport
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class ReplaceVnfInfra extends VnfCmBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ReplaceVnfInfra.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "RPLVnfI_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'RPLVnfI_')
+ execution.setVariable('Request', null)
+ execution.setVariable('requestInfo', null)
+ execution.setVariable('source', null)
+ execution.setVariable('vnfInputs', null)
+ execution.setVariable('tenantId', null)
+ execution.setVariable('vnfParams', null)
+ execution.setVariable('controllerType', null)
+ execution.setVariable('cloudConfiguration', null)
+ execution.setVariable('ReplaceVnfSuccessIndicator', false)
+ execution.setVariable('serviceType', null)
+ execution.setVariable('nfRole', null)
+ execution.setVariable('currentActivity', 'RPLVnfI')
+ execution.setVariable('workStep', null)
+ execution.setVariable('failedActivity', null)
+ execution.setVariable('errorCode', "0")
+ execution.setVariable('errorText', null)
+ execution.setVariable('healthCheckIndex', 1)
+ execution.setVariable('retainResources', true)
+ execution.setVariable('productFamilyId', null)
+ execution.setVariable('healthCheckIndex0', 0)
+ execution.setVariable('healthCheckIndex1', 1)
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", false)
+ execution.setVariable("rollbackVnfStop", false)
+ execution.setVariable("rollbackVnfLock", false)
+ execution.setVariable("rollbackQuiesceTraffic", false)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", false)
+ execution.setVariable("platform", null)
+ execution.setVariable("lineOfBusiness", null)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ execution.setVariable('serviceInstanceId', serviceInstanceId)
+ execution.setVariable("isVidRequest", "true")
+ execution.setVariable('serviceType', 'Mobility')
+ execution.setVariable('retainResources', true)
+ execution.setVariable('disableRollback', true)
+ execution.setVariable('payload', "")
+ execution.setVariable('actionLock', Action.Lock)
+ execution.setVariable('actionUnlock', Action.Unlock)
+ execution.setVariable('actionHealthCheck', Action.HealthCheck)
+ execution.setVariable('actionStart', Action.Start)
+ execution.setVariable('actionStop', Action.Stop)
+
+ def asdcServiceModelVersion = ''
+ def serviceModelInfo = null
+
+ def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ msoLogger.debug("PROCESSING SERVICE INFO")
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ msoLogger.debug("ServiceModelInfo: " + serviceModelInfo)
+ def modelInvariant = jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ msoLogger.debug("modelInvariant: " + modelInvariant)
+ }
+
+ }
+ }
+
+ execution.setVariable('asdcServiceModelVersion', asdcServiceModelVersion)
+ execution.setVariable('serviceModelInfo', serviceModelInfo)
+ def vnfModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
+ execution.setVariable('vnfModelInfo', vnfModelInfo)
+ def vnfModelInvariantUuid = jsonUtils.getJsonValue(vnfModelInfo, "modelInvariantUuid")
+ execution.setVariable('vnfModelInvariantUuid', vnfModelInvariantUuid)
+ msoLogger.debug("vnfModelInvariantUuid: " + vnfModelInvariantUuid)
+
+ def vnfType = execution.getVariable('vnfType')
+ execution.setVariable('vnfType', vnfType)
+
+
+ def controllerType = reqMap.requestDetails?.requestParameters?.controllerType
+ execution.setVariable('controllerType', controllerType)
+
+ msoLogger.debug('Controller Type: ' + controllerType)
+
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> userParamsMap = [:]
+ if (userParams != null) {
+ userParams.each { userParam ->
+ userParamsMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug('Processed user params: ' + userParamsMap)
+
+ execution.setVariable('vfModuleInputParams', userParamsMap)
+
+ def requestId = execution.getVariable("requestId")
+ execution.setVariable('msoRequestId', requestId)
+ msoLogger.debug("requestId is: " + requestId)
+
+ def vnfName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
+ execution.setVariable('vnfName', vnfName)
+
+ def requestorId = reqMap.requestDetails?.requestInfo?.requestorId ?: null
+ execution.setVariable('requestorId', requestorId)
+
+ def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
+ execution.setVariable('usePreload', usePreload)
+
+ def productFamilyId = reqMap.requestDetails?.requestInfo?.productFamilyId ?: null
+ execution.setVariable('productFamilyId', productFamilyId)
+
+ def cloudConfiguration = jsonOutput.toJson(reqMap.requestDetails?.cloudConfiguration)
+ execution.setVariable('cloudConfiguration', cloudConfiguration)
+ def lcpCloudRegionId = jsonUtils.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable('lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = jsonUtils.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable('tenantId', tenantId)
+
+ def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
+ execution.setVariable('globalSubscriberId', globalSubscriberId)
+
+ execution.setVariable('sdncVersion', '1702')
+
+ execution.setVariable("ReplaceVnfInfraSuccessIndicator", false)
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable("source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>REPLACE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("requestInfo", requestInfo)
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable("requestInfo"))
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('requestInfo')
+ def requestId = execution.getVariable('requestId')
+ def source = execution.getVariable('source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vnfId = execution.getVariable("vnfId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Get VnfResource decomposition object for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getVnfResourceDecomposition(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.getVnfResourceDecomposition(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String vnfModelInvariantUuid = execution.getVariable('vnfModelInvariantUuid')
+ msoLogger.debug("vnfModelInvariantUuid: " + vnfModelInvariantUuid)
+ List<VnfResource> vnfResources = serviceDecomposition.getVnfResources()
+
+ for (i in 0..vnfResources.size()-1) {
+ ModelInfo modelInfo = vnfResources[i].getModelInfo()
+ String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
+ msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
+
+ if (vnfModelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
+ VnfResource vnfResourceDecomposition = vnfResources[i]
+ execution.setVariable('vnfResourceDecomposition', vnfResourceDecomposition)
+ def nfRole = vnfResourceDecomposition.getNfRole()
+ execution.setVariable('nfRole', nfRole)
+ msoLogger.debug("vnfResourceDecomposition: " + vnfResourceDecomposition.toJsonString())
+ break
+ }
+ else {
+ //exception!
+ }
+
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if this VNF is already in maintenance in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfVnfInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfVnfInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkIfVnfInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("isInMaint result: " + isInMaint)
+ execution.setVariable('isVnfInMaintenance', isInMaint)
+
+ if (isInMaint) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "VNF is in maintenance in A&AI")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF's pservers are locked in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfPserversInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfPserversInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "checkIfPserversInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("areLocked result: " + areLocked)
+ execution.setVariable('arePserversLocked', areLocked)
+
+ if (areLocked) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "pServers are locked in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set inMaint flag for this VNF to the specified value in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param inMaint The boolean value of the flag to set
+ */
+ public void setVnfInMaintFlagInAAI(DelegateExecution execution, boolean inMaint) {
+ def method = getClass().getSimpleName() + '.setVnfInMaintFlagInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ if (inMaint) {
+ execution.setVariable("workStep", "setVnfInMaintFlagInAAI")
+ }
+ else {
+ execution.setVariable("workStep", "unsetVnfInMaintFlagInAAI")
+ }
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIUpdatorImpl aaiUpdator = new AAIUpdatorImpl()
+ aaiUpdator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ if (inMaint) {
+ aaiUpdator.updateVnfToLocked(vnfId, transactionLoggingUuid)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ aaiUpdator.updateVnfToUnLocked(vnfId, transactionLoggingUuid)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in setVnfInMaintFlagInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Call APP-C client to execute specified APP-C command for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param action The action to take in APP-C.
+ */
+ public void runAppcCommand(DelegateExecution execution, Action action) {
+ def method = getClass().getSimpleName() + '.runAppcCommand(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ msoLogger.debug("Running APP-C action: " + action.toString())
+ String vnfId = execution.getVariable('vnfId')
+ String msoRequestId = execution.getVariable('requestId')
+ execution.setVariable('msoRequestId', msoRequestId)
+ execution.setVariable("failedActivity", "APP-C")
+ execution.setVariable("workStep", action.toString() + "VNF")
+
+ ApplicationControllerOrchestrator appcClient = new ApplicationControllerOrchestrator()
+ Status appcStatus = null
+ switch(action) {
+ case Action.Lock:
+ execution.setVariable('workStep', "LockVNF")
+ appcStatus = appcClient.runCommand(Action.Lock,msoRequestId,vnfId,null)
+ break
+ case Action.Unlock:
+ execution.setVariable('workStep', "UnlockVNF")
+ appcStatus = appcClient.runCommand(Action.Unlock,msoRequestId,vnfId,null)
+ break
+ case Action.HealthCheck:
+ def healthCheckIndex = execution.getVariable('healthCheckIndex')
+ execution.setVariable('workStep', "HealthCheckVNF" + healthCheckIndex)
+ execution.setVariable('healthCheckIndex', healthCheckIndex + 1)
+ appcStatus = appcClient.runCommand(Action.HealthCheck,msoRequestId,vnfId,null)
+ break
+ case Action.Start:
+ execution.setVariable('workStep', "StartVNF")
+ appcStatus = appcClient.runCommand(Action.Start,msoRequestId,vnfId,null)
+ break
+ case Action.Stop:
+ execution.setVariable('workStep', "StopVNF")
+ appcStatus = appcClient.runCommand(Action.Stop,msoRequestId,vnfId,null)
+ break
+ default:
+ break
+ }
+ msoLogger.debug("Completed AppC request")
+ int appcCode = appcStatus.getCode()
+ msoLogger.debug("AppC status code is: " + appcCode)
+ msoLogger.debug("AppC status message is: " + appcStatus.getMessage())
+ if (support.getCategoryOf(appcStatus) == ApplicationControllerSupport.StatusCategory.ERROR) {
+ execution.setVariable("errorCode", Integer.toString(appcCode))
+ execution.setVariable("errorText", appcStatus.getMessage())
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ } catch (java.lang.NoSuchMethodError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Prepare DoDeleteVnfAndModules call.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoDeleteVnfAndModules(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoDeleteVnfAndModules(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "doDeleteVnfAndModules")
+ execution.setVariable("failedActivity", "MSO Delete VNF")
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+ /**
+ * Prepare DoCreateVnfAndModules call.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoCreateVnfAndModules(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoReplaceVnfAndModules(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "doCreateVnfAndModules")
+ execution.setVariable("failedActivity", "MSO Create VNF")
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+
+ /**
+ * Handle Abort disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void abortProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.abortProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def errorText = execution.getVariable("errorText")
+ def errorCode = execution.getVariable("errorCode")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode as Integer, errorText)
+ }
+
+ /**
+ * Handle Manual disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void manualProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.manualProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def taskId = execution.getVariable("taskId")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Processing halted - manual task created: " + taskId)
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
new file mode 100644
index 0000000000..d729c770ca
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
@@ -0,0 +1,148 @@
+/*-
+ * ============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 groovy.json.JsonOutput
+
+import groovy.json.JsonSlurper
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+import java.util.UUID;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.cmd.AbstractSetVariableCmd
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.rest.APIResponse
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.onap.so.bpmn.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.client.aai.*
+
+import org.onap.so.client.appc.ApplicationControllerClient;
+import org.onap.so.client.appc.ApplicationControllerSupport;
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.appc.client.lcm.model.Action;
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+public class RollbackVnf extends VnfCmBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, RollbackVnf.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "VnfIPU_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'RVnf_')
+
+ execution.setVariable('rollbackSuccessful', false)
+ execution.setVariable('currentActivity', 'RVnf')
+ execution.setVariable('workStep', null)
+ execution.setVariable('failedActivity', null)
+ execution.setVariable('errorCode', "0")
+ execution.setVariable('actionUnlock', Action.Unlock)
+ execution.setVariable('actionStart', Action.Start)
+ execution.setVariable('actionResumeTraffic', Action.ResumeTraffic)
+
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ try {
+
+ execution.setVariable("rollbackErrorCode", "0")
+
+ if (execution.getVariable("rollbackSetClosedLoopDisabledFlag") == true) {
+ msoLogger.debug("Will call setClosedLoopDisabledFlag")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("rollbackErrorCode", "1")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Determine success of rollback execution.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void setRollbackResult(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.setRollbackResult(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ def rollbackErrorCode = execution.getVariable('rollbackErrorCode')
+ if (rollbackErrorCode == "0") {
+ execution.setVariable('rollbackSuccessful', true)
+ msoLogger.debug("rollback successful")
+ }
+ else {
+ execution.setVariable('rollbackSuccessful', false)
+ msoLogger.debug("rollback unsuccessful")
+ }
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
new file mode 100644
index 0000000000..3a309cf5a2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
@@ -0,0 +1,296 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 CMCC. 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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.utils.UUIDChecker
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * This groovy class supports the <class>ScaleCustomE2EServiceInstance.bpmn</class> process.
+ *
+ */
+public class ScaleCustomE2EServiceInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ScaleCustomE2EServiceInstance.class);
+
+ String Prefix = "CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix", Prefix)
+ String msg = ""
+ msoLogger.trace("preProcessRequest() ")
+
+ try {
+
+ String siRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ msoLogger.debug("Input Request:" + siRequest + " reqId:" + requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ serviceInstanceId = "NULL".toString()
+ }
+ msoLogger.debug("Generated new Service Instance:" + serviceInstanceId)
+ serviceInstanceId = UriUtils.encode(serviceInstanceId, "UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ // service instance ID is also service ID
+ execution.setVariable("serviceId", serviceInstanceId)
+ // service instance name
+ String serviceInstanceName = jsonUtil.getJsonValue(siRequest, "service.serviceInstanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ // service instance name
+ String serviceType = jsonUtil.getJsonValue(siRequest, "service.serviceType")
+ execution.setVariable("serviceType", serviceType)
+
+ // operationa ID (key)
+ //String operationKey = UUIDChecker.generateUUID(msoLogger)
+ String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
+ execution.setVariable("operationId", operationId)
+ msoLogger.debug("Input Request:" + siRequest + " operationId:" + operationId)
+
+
+ String resources = jsonUtil.getJsonValue(siRequest, "service.resources")
+ execution.setVariable("resources", resources)
+
+ // node template UUID
+ String nodeTemplateUUID = UUIDChecker.generateUUID(msoLogger)
+ execution.setVariable("nodeTemplateUUID", nodeTemplateUUID)
+
+ //subscriberInfo
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "service.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ String requestDescription = "request description for test"
+ execution.setVariable("requestDescription", requestDescription)
+ execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit preProcessRequest ")
+ }
+
+ public void sendSyncResponse(DelegateExecution execution) {
+ msoLogger.trace("sendSyncResponse ")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ // RESTResponse for API Handler (APIH) Reply Task
+ String scaleServiceRestRequest = """{"operationId":"${operationId}"}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + scaleServiceRestRequest)
+ sendWorkflowResponse(execution, 202, scaleServiceRestRequest)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit sendSyncResopnse ")
+ }
+
+
+ public void sendSyncError(DelegateExecution execution) {
+ msoLogger.trace("sendSyncError ")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ public void prepareCompletionRequest(DelegateExecution execution) {
+ msoLogger.trace("prepareCompletion ")
+
+ try {
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>SCALE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <status-message>Service Instance was scaled successfully.</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>ScaleGenericALaCarteServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit prepareCompletionRequest ")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution) {
+ msoLogger.trace("prepareFalloutRequest ")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Input Workflow Exception: " + wfex.toString())
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>SCALE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.debug("Exception prepareFalloutRequest:" + ex.getMessage())
+ String errorException = " Bpmn error encountered in ScaleGenericALaCarteServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>SCALE</action>
+ <source>UUI</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ msoLogger.trace("Exit prepareFalloutRequest ")
+ }
+
+
+ /**
+ * Init the service Operation Status
+ */
+ public void prepareInitServiceOperationStatus(DelegateExecution execution){
+ msoLogger.trace("STARTED prepareInitServiceOperationStatus Process ")
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ //String serviceName = execution.getVariable("serviceInstanceName")
+ String operationId = execution.getVariable("operationId")
+ String operationType = "SCALE"
+ String userId = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service scaling"
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ msoLogger.info("DB Adapter Endpoint is: " + dbAdapterEndpoint)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <serviceName>${MsoUtils.xmlEscape(serviceName)}</serviceName>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ msoLogger.info("Outgoing updateServiceOperStatusRequest: \n" + payload)
+ msoLogger.debug("Scale network service updateServiceOperStatusRequest Request: " + payload)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("COMPLETED prepareInitServiceOperationStatus Process ")
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
new file mode 100644
index 0000000000..538f882c2b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -0,0 +1,570 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.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.json.JSONArray
+import org.json.JSONObject
+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.springframework.web.util.UriUtils
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>UpdateCustomE2EServiceInstance.bpmn</class> process.
+ * AlaCarte flow for 1702 ServiceInstance Update
+ *
+ */
+public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor {
+ String Prefix="UPDSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)
+
+ try {
+
+ String siRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ utils.log("INFO", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "Input serviceInstanceId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ //subscriberInfo for aai
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId' is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestDetails
+ execution.setVariable("source", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source"))
+ execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.instanceName"))
+ execution.setVariable("disableRollback", jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.suppressRollback"))
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ } else {
+ execution.setVariable("productFamilyId", productFamilyId)
+ }
+
+ //user params
+ 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")
+ if (isBlank(uuiRequest)) {
+ msg = "Input uuiRequest is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else
+ {
+ execution.setVariable("uuiRequest", uuiRequest)
+ }
+
+ utils.log("INFO", "uuiRequest:\n" + uuiRequest, isDebugEnabled)
+
+ //serviceType for aai
+ String serviceType = jsonUtil.getJsonValue(uuiRequest, "service.serviceType")
+ if (isBlank(serviceType)) {
+ msg = "Input serviceType is null"
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } 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)
+
+ //operationId
+ String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
+ if (isBlank(operationId)) {
+ operationId = UUID.randomUUID().toString()
+ }
+ 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) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+
+ public void postProcessAAIGET(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ 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) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ 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) {
+ 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)
+ }
+
+ /**
+ * Init the service Operation Status
+ */
+ public void prepareInitServiceOperationStatus(DelegateExecution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ======== STARTED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
+ try{
+ String serviceId = execution.getVariable("serviceInstanceId")
+ String operationId = execution.getVariable("operationId")
+ String operationType = execution.getVariable("operationType")
+ String userId = ""
+ String result = "processing"
+ String progress = "0"
+ String reason = ""
+ String operationContent = "Prepare service updating"
+ utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
+ serviceId = UriUtils.encode(serviceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceId)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ payload = utils.formatXml(payload)
+ execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ utils.log("DEBUG", "Outgoing updateServiceOperStatusRequest: \n" + payload, isDebugEnabled)
+ utils.logAudit("CreateVfModuleInfra Outgoing updateServiceOperStatusRequest Request: " + payload)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing prepareInitServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * Update the service Operation Status
+ */
+ 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 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)
+ execution.setVariable("operationId", operationId)
+ execution.setVariable("operationType", operationType)
+
+ 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)
+
+ execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+ String payload =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
+ <operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
+ <operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
+ <userId>${MsoUtils.xmlEscape(userId)}</userId>
+ <result>${MsoUtils.xmlEscape(result)}</result>
+ <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <reason>${MsoUtils.xmlEscape(reason)}</reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ 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)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
+ }
+ utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
+ utils.log("INFO", "Exited " + method, isDebugEnabled)
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ def hasResourcetoUpdate = execution.getVariable("hasResourcetoUpdate")
+
+ String updateServiceResp = ""
+ if(hasResourcetoUpdate) {
+ // RESTResponse for API Handler (APIH) Reply Task
+ updateServiceResp = """{"operationId":"${operationId}"}""".trim()
+ }
+ 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)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** sendSyncError *** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ int errorCode = 7000
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ errorCode = wfe.getErrorCode()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("INFO", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** prepareCompletion *** ", isDebugEnabled)
+
+ try {
+ 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">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <status-message>Service Instance was updated successfully.</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>UpdateCustomE2EServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("INFO", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("INFO", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("INFO", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("INFO", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("INFO", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ String errorException = " Bpmn error encountered in UpdateCustomE2EServiceInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ String requestId = execution.getVariable("msoRequestId")
+ String falloutRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>UUI</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ 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-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
new file mode 100644
index 0000000000..329d58aa58
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
@@ -0,0 +1,403 @@
+/*-
+ * ============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.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.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.*
+
+/**
+ * This groovy class supports the <class>UpdateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class UpdateNetworkInstance extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateNetworkInstance.class);
+
+ String Prefix="UPDNI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public InitializeProcessVariables(DelegateExecution execution){
+
+ execution.setVariable(Prefix + "source", "")
+ execution.setVariable(Prefix + "Success", false)
+
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ execution.setVariable(Prefix + "FalloutHandlerRequest", "")
+
+ }
+
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest() of UpdateNetworkInstance Request")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null || sdncVersion == "1610") {
+ // 'a-la-cart' default, sdncVersion = '1610'
+ execution.setVariable("sdncVersion", "1610")
+ String bpmnRequest = execution.getVariable("bpmnRequest")
+ if (bpmnRequest != null) {
+ String disableRollback = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.requestInfo.suppressRollback")
+ if (disableRollback != null) {
+ execution.setVariable("disableRollback", disableRollback)
+ msoLogger.debug("Received 'suppressRollback': " + disableRollback )
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ msoLogger.debug(" Set 'disableRollback' : " + execution.getVariable("disableRollback") )
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ msoLogger.debug(dataErrorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' TEST ONLY, sdncVersion = '1702'
+ msoLogger.debug(" \'disableRollback\' : " + execution.getVariable("disableRollback") )
+ }
+
+ String requestId = execution.getVariable("msoRequestId")
+ if (requestId != null) {
+ execution.setVariable("mso-request-id", requestId)
+ } else {
+ requestId = execution.getVariable("mso-request-id")
+ }
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // get/set 'requestId'
+ if (execution.getVariable("requestId") == null) {
+ execution.setVariable("requestId", requestId)
+ }
+
+ //Place holder for additional code.
+
+ // TODO ???
+ // userParams??? 1) pre-loads indicator, 2) 'auto-activation'
+ // Tag/Value parameters
+ //
+ // Map: 'networkInputParams': 'auto-activation''
+ // Sample format?
+ // "requestParameters": {
+ // "userParams": [
+ // {
+ // "name": "someUserParam1",
+ // "value": "someValue1"
+ // }
+ // ]
+ // }
+ //
+ // String userParams = //use json util to extract "userParams"//
+ // execution.setVariable("networkInputParams", userParams)
+ // else: execution.setVariable("networkInputParams", null)
+ //
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in UpdateNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside sendSyncResponse() of UpdateNetworkInstance")
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug(" sendSyncResponse to APIH - " + "\n" + updateNetworkRestRequest)
+ sendWorkflowResponse(execution, 202, updateNetworkRestRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void getNetworkModelInfo (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside getNetworkModelInfo() of UpdateNetworkInstance")
+
+ try {
+
+ // For Ala-Carte (sdnc = 1610):
+ // 1. the Network ModelInfo is expected to be sent
+ // via requestDetails.modelInfo (modelType = network), ex: modelCustomizationId
+ // 2. the Service ModelInfo is expected to be sent but will be IGNORE
+ // via requestDetails.relatedInstanceList.relatedInstance.modelInfo (modelType = service)
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside sendSyncError() of UpdateNetworkInstance")
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // REST Error (for API Handler (APIH) Reply Task)
+ String syncError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 500, syncError)
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Bpmn error encountered in UpdateNetworkInstance flow. sendSyncError() - " + ex.getMessage())
+ }
+
+ }
+
+ public void prepareCompletion (DelegateExecution execution) {
+
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside prepareCompletion() of UpdateNetworkInstance")
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been updated successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ // normal path
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside postProcessResponse() of UpdateNetworkInstance")
+
+ try {
+
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ msoLogger.trace("UpdateNetworkInstance Success ")
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ msoLogger.trace("UpdateNetworkInstance Failed in CompletionMsoProces flow!. ")
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processRollbackData (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside processRollbackData() of UpdateNetworkInstance")
+
+ try {
+ //execution.getVariable("orchestrationStatus")
+ //execution.getVariable("networkId")
+ //execution.getVariable("networkName")
+ //networkOutputParams
+ //rollbackData
+ //rolledBack
+
+ } catch (Exception ex) {
+ msoLogger.debug(" Bpmn error encountered in UpdateNetworkInstance flow. callDBCatalog() - " + ex.getMessage())
+ }
+
+ }
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (DelegateExecution execution) {
+
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. ")
+
+ String falloutHandlerRequest = ""
+ String requestId = execution.getVariable("mso-request-id")
+
+ try {
+
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ String errorCode = String.valueOf(wfe.getErrorCode())
+ String errorMessage = wfe.getErrorMessage()
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${MsoUtils.xmlEscape(errorCode)}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ msoLogger.debug(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.debug(" Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest)
+
+ } catch (Exception ex) {
+ String errorException = " Bpmn error encountered in UpdateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - "
+ msoLogger.debug("Exception error in UpdateNetworkInstance flow, buildErrorResponse(): " + ex.getMessage())
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorException)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ msoLogger.debug(" Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest)
+
+ }
+
+ }
+
+ 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
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method" + Prefix)
+ }
+ msoLogger.debug("Completed processJavaException Method in " + Prefix)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
new file mode 100644
index 0000000000..b1aaf5ea5f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
@@ -0,0 +1,326 @@
+/*-
+ * ============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.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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+
+public class UpdateVfModule extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModule.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVfMod_')
+ execution.setVariable('UPDVfMod_Request', null)
+ execution.setVariable('UPDVfMod_requestInfo', null)
+ execution.setVariable('UPDVfMod_requestId', null)
+ execution.setVariable('UPDVfMod_source', null)
+ execution.setVariable('UPDVfMod_vnfInputs', null)
+ execution.setVariable('UPDVfMod_vnfId', null)
+ execution.setVariable('UPDVfMod_vfModuleId', null)
+ execution.setVariable('UPDVfMod_tenantId', null)
+ execution.setVariable('UPDVfMod_volumeGroupId', null)
+ execution.setVariable('UPDVfMod_vnfParams', null)
+ execution.setVariable('UPDVfMod_updateInfraRequest', null)
+ execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ initProcessVariables(execution)
+ String request = validateRequest(execution)
+
+ msoLogger.debug("UpdateVfModule request: " + request)
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfMod_requestInfo', requestInfo)
+ execution.setVariable('UPDVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfMod_source', getNodeTextForce(requestInfo, 'source'))
+
+ def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+ execution.setVariable('UPDVfMod_vnfInputs', vnfInputs)
+ execution.setVariable('UPDVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+ execution.setVariable('UPDVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+ execution.setVariable('UPDVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+ execution.setVariable('UPDVfMod_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+ def vnfParams = utils.getNodeXml(request, 'vnf-params')
+ execution.setVariable('UPDVfMod_vnfParams', vnfParams)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare and send the synchronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfMod_requestInfo')
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+ def source = execution.getVariable('UPDVfMod_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def vnfInputs = execution.getVariable('UPDVfMod_vnfInputs')
+
+ String synchResponse = """
+ <vnf-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE_VF_MODULE</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <start-time>${MsoUtils.xmlEscape(startTime)}</start-time>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ ${vnfInputs}
+ </vnf-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.debug("UpdateVfModule Synch Response: " + synchResponse)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the Request for invoking the DoUpdateVfModule subflow.
+ *
+ * NOTE: Currently, the method just logs passing through as the
+ * incoming Request to this main flow is used as the Request to
+ * the DoUpdateVfModule subflow. No preparation processing is
+ * necessary.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoUpdateVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the Request for updating the DB for this Infra Request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+ def vnfId = execution.getVariable('UPDVfMod_vnfId')
+ def vfModuleId = execution.getVariable('UPDVfMod_vfModuleId')
+ def tenantId = execution.getVariable('UPDVfMod_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfMod_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <tenant-id>${MsoUtils.xmlEscape(tenantId)}</tenant-id>
+ <volume-group-id>${MsoUtils.xmlEscape(volumeGroupId)}</volume-group-id>
+ </vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfMod_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+
+ msoLogger.debug("UpdateVfModule Infra Request: " + updateInfraRequest)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void completionHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = getVariable(execution, 'UPDVfMod_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.debug("UpdateVfModule CompletionHandler Request: " + content)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+ def request = getVariable(execution, prefix+'Request')
+ def requestInformation = utils.getNodeXml(request, 'request-information', false)
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.debug("UpdateVfModule fallOutHandler Request: " + content)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
new file mode 100644
index 0000000000..416d0d6e60
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
@@ -0,0 +1,504 @@
+/*-
+ * ============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.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.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModuleInfra.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVfModI_')
+ execution.setVariable('UPDVfModI_Request', null)
+ execution.setVariable('UPDVfModI_requestInfo', null)
+ execution.setVariable('UPDVfModI_requestId', null)
+ execution.setVariable('UPDVfModI_source', null)
+ execution.setVariable('UPDVfModI_vnfInputs', null)
+ execution.setVariable('UPDVfModI_vnfId', null)
+ execution.setVariable('UPDVfModI_vfModuleId', null)
+ execution.setVariable('UPDVfModI_tenantId', null)
+ execution.setVariable('UPDVfModI_volumeGroupId', null)
+ execution.setVariable('UPDVfModI_vnfParams', null)
+ execution.setVariable('UPDVfModI_updateInfraRequest', null)
+ execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def prefix = "UPDVfModI_"
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ execution.setVariable(prefix + 'serviceInstanceId', serviceInstanceId)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+
+ def vnfName = ''
+ def asdcServiceModelVersion = ''
+ def serviceModelInfo = null
+ def vnfModelInfo = null
+
+ def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+
+ }
+ if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+ vnfName = it.relatedInstance.instanceName ?: ''
+ vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ }
+ }
+ }
+
+ execution.setVariable(prefix + 'vnfName', vnfName)
+ execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion)
+ execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo)
+ execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo)
+
+ def vnfType = execution.getVariable('vnfType')
+ execution.setVariable(prefix + 'vnfType', vnfType)
+ def vfModuleId = execution.getVariable('vfModuleId')
+ execution.setVariable(prefix + 'vfModuleId', vfModuleId)
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ execution.setVariable(prefix + 'volumeGroupId', volumeGroupId)
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> userParamsMap = [:]
+ if (userParams != null) {
+ userParams.each { userParam ->
+ userParamsMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug('Processed user params: ' + userParamsMap)
+
+ execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap)
+
+ def isBaseVfModule = "false"
+ if (execution.getVariable('isBaseVfModule') == true) {
+ isBaseVfModule = "true"
+ }
+
+ execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule)
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable(prefix + 'requestId', requestId)
+
+ def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
+ execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo)
+
+ def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback
+
+
+ def backoutOnFailure = ""
+ if(suppressRollback != null){
+ if ( suppressRollback == true) {
+ backoutOnFailure = "false"
+ } else if ( suppressRollback == false) {
+ backoutOnFailure = "true"
+ }
+ }
+
+ execution.setVariable('disableRollback', suppressRollback)
+
+ def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
+ execution.setVariable(prefix + 'vfModuleName', vfModuleName)
+
+ def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: ''
+ execution.setVariable(prefix + 'serviceId', serviceId)
+
+ def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
+ execution.setVariable(prefix + 'usePreload', usePreload)
+
+ def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
+ def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId
+ execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = cloudConfiguration.tenantId
+ execution.setVariable(prefix + 'tenantId', tenantId)
+
+ def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
+ execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId)
+
+ execution.setVariable(prefix + 'sdncVersion', '1702')
+
+ execution.setVariable("UpdateVfModuleInfraSuccessIndicator", false)
+
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable(prefix + "source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable(prefix + "requestInfo", requestInfo)
+
+ //backoutOnFailure
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable(prefix + "requestInfo"))
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModI_requestInfo')
+ def requestId = execution.getVariable('UPDVfModI_requestId')
+ def source = execution.getVariable('UPDVfModI_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vfModuleId = execution.getVariable("vfModuleId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the Request for invoking the DoUpdateVfModule subflow.
+ *
+ * NOTE: Currently, the method just logs passing through as the
+ * incoming Request to this main flow is used as the Request to
+ * the DoUpdateVfModule subflow. No preparation processing is
+ * necessary.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoUpdateVfModule(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare the Request for updating the DB for this Infra Request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('UPDVfModI_requestId')
+ def vnfId = execution.getVariable('UPDVfModI_vnfId')
+ def vfModuleId = execution.getVariable('UPDVfModI_vfModuleId')
+ def tenantId = execution.getVariable('UPDVfModI_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModI_volumeGroupId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>
+ <vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
+ <vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
+ <tenant-id>${MsoUtils.xmlEscape(tenantId)}</tenant-id>
+ <volume-group-id>${MsoUtils.xmlEscape(volumeGroupId)}</volume-group-id>
+ </vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModI_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void completionHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = getVariable(execution, 'UPDVfModI_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+ def request = getVariable(execution, prefix+'Request')
+ def requestInformation = execution.getVariable(prefix + "requestInfo")
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Validates the request, request id and service instance id. If a problem is found,
+ * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+ * method also sets up the log context for the workflow.
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateInfraRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ if (prefix == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
+ }
+
+ try {
+ def request = execution.getVariable(prefix + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable(processKey + 'Request')
+
+ if (request == null) {
+ request = execution.getVariable('bpmnRequest')
+ }
+
+ setVariable(execution, processKey + 'Request', null);
+ setVariable(execution, 'bpmnRequest', null);
+ setVariable(execution, prefix + 'Request', request);
+ }
+
+ if (request == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
+ }
+
+ /*
+
+ def requestId = execution.getVariable("mso-request-id")
+
+ if (requestId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
+ }
+
+ setVariable(execution, prefix + 'requestId', requestId)
+
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
+
+ if (serviceInstanceId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
+ }
+
+ utils.logContext(requestId, serviceInstanceId)
+ */
+ msoLogger.debug('Incoming message: ' + System.lineSeparator() + request)
+ msoLogger.trace('Exited ' + method)
+ return request
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
new file mode 100644
index 0000000000..a926030924
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
@@ -0,0 +1,468 @@
+/*-
+ * ============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.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.client.aai.AAIValidatorImpl
+import org.onap.so.client.appc.ApplicationControllerClient
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class UpdateVfModuleInfraV2 {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModuleInfraV2.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ boolean preProcessRequestCheck = true;
+ boolean sendSynchResponseCheck = true;
+ boolean checkPserverFlagCheck = true;
+ boolean vfFlagCheckSetCheck = true;
+ boolean lockAppCCheck = true;
+ boolean healthDiagnosticSDNOCheck = true;
+ boolean healthCheckAppCCheck = true;
+ boolean stopVfModuleControllerCheck = true;
+ boolean healthCheckControllerCheck = true;
+ boolean doUpdateVfModulePrepCheck = true;
+ boolean completionHandlerPrepCheck = true;
+ boolean startVfModuleControllerCheck = true;
+ boolean vFFlagUnsetCheck = true;
+ boolean unlockAppCCheck = true;
+ boolean postUpgradeHealthCheckControllerCheck = true;
+
+
+
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVfModI_')
+ execution.setVariable('UPDVfModI_Request', null)
+ execution.setVariable('UPDVfModI_requestInfo', null)
+ execution.setVariable('UPDVfModI_requestId', null)
+ execution.setVariable('UPDVfModI_source', null)
+ execution.setVariable('UPDVfModI_vnfInputs', null)
+ execution.setVariable('UPDVfModI_vnfId', null)
+ execution.setVariable('UPDVFModI_moduleUuid', null)
+ execution.setVariable('UPDVfModI_vfModuleId', null)
+ execution.setVariable('UPDVfModI_tenantId', null)
+ execution.setVariable('UPDVfModI_volumeGroupId', null)
+ execution.setVariable('UPDVfModI_vnfParams', null)
+ execution.setVariable('UPDVfModI_updateInfraRequest', null)
+ execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ System.out.print("*****************************PreProcessRequest**************************")
+
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ //msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def prefix = "UPDVfModI_"
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ //msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ //msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+ def moduleUuid = execution.getVariable('moduleUuid')
+ execution.setVariable(prefix + 'moduleUuid',moduleUuid)
+ execution.setVariable(prefix + 'serviceInstanceId', serviceInstanceId)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+
+ def vnfName = ''
+ def asdcServiceModelVersion = ''
+ def serviceModelInfo = null
+ def vnfModelInfo = null
+
+ def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ }
+ if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+ vnfName = it.relatedInstance.instanceName ?: ''
+ vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ }
+ }
+ }
+
+ execution.setVariable(prefix + 'vnfName', vnfName)
+ execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion)
+ execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo)
+ execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo)
+
+ def vnfType = execution.getVariable('vnfType')
+ execution.setVariable(prefix + 'vnfType', vnfType)
+ def vfModuleId = execution.getVariable('vfModuleId')
+ execution.setVariable(prefix + 'vfModuleId', vfModuleId)
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ execution.setVariable(prefix + 'volumeGroupId', volumeGroupId)
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> userParamsMap = [:]
+ if (userParams != null) {
+ userParams.each { userParam ->
+ userParamsMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ //msoLogger.debug('Processed user params: ' + userParamsMap)
+
+ execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap)
+
+ def isBaseVfModule = "false"
+ if (execution.getVariable('isBaseVfModule') == true) {
+ isBaseVfModule = "true"
+ }
+
+ execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule)
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable(prefix + 'requestId', requestId)
+
+ def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
+ execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo)
+
+ def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback
+
+
+ def backoutOnFailure = ""
+ if(suppressRollback != null){
+ if ( suppressRollback == true) {
+ backoutOnFailure = "false"
+ } else if ( suppressRollback == false) {
+ backoutOnFailure = "true"
+ }
+ }
+
+ execution.setVariable('disableRollback', suppressRollback)
+
+ def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
+ execution.setVariable(prefix + 'vfModuleName', vfModuleName)
+
+ def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: ''
+ execution.setVariable(prefix + 'serviceId', serviceId)
+
+ def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
+ execution.setVariable(prefix + 'usePreload', usePreload)
+
+ def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
+ def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId
+ execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = cloudConfiguration.tenantId
+ execution.setVariable(prefix + 'tenantId', tenantId)
+
+ def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
+ execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId)
+
+ execution.setVariable(prefix + 'sdncVersion', '1702')
+
+ execution.setVariable("UpdateVfModuleInfraSuccessIndicator", false)
+
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable(prefix + "source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable(prefix + "requestInfo", requestInfo)
+
+ //backoutOnFailure
+
+ //msoLogger.debug('RequestInfo: ' + execution.getVariable(prefix + "requestInfo"))
+
+ //msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ //msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ //msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the synchronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ System.out.print("*****************************SendSynchResponse**************************")
+
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ //msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModI_requestInfo')
+ def requestId = execution.getVariable('UPDVfModI_requestId')
+ def source = execution.getVariable('UPDVfModI_source')
+
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vfModuleId = execution.getVariable("vfModuleId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+ sendWorkflowResponse(execution, 200, synchResponse)
+ //msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ //msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+ //check to see if the Pserver Flag is locked
+ public void checkPserverFlag(DelegateExecution execution) {
+
+ System.out.println("*****************************CheckingPserverFlag*************************")
+ String vnfId = (String)execution.getVariable('vnfId')
+ String uuid = (String)execution.getVariable('moduleUuid')
+ AAIValidatorImpl aaiVI = new AAIValidatorImpl()
+ boolean flag = aaiVI.isPhysicalServerLocked(vnfId, uuid)
+ }
+
+ //check to see if the VFFlag is locked
+ public void vfFlagCheck(DelegateExecution execution) {
+
+ System.out.print("*****************************VfFlagCheck*************************")
+ String vnfId = (String)execution.getVariable('vnfId')
+ String uuid = (String)execution.getVariable('moduleUuid')
+ AAIValidatorImpl aaiVI = new AAIValidatorImpl()
+ boolean flag = aaiVI.isVNFLocked(vnfId, uuid)
+
+ }
+ //lock the VF Flag
+ public void vfFlagSet(DelegateExecution execution) {
+
+ System.out.print("*****************************VfFlagSet*************************")
+ String vnfId = (String)execution.getVariable('vnfId')
+ String uuid = (String)execution.getVariable('moduleUuid')
+ AAIValidatorImpl aaiVI = new AAIValidatorImpl()
+ aaiVI.updateVnfToLocked(vnfId,uuid);
+
+ }
+
+ //Lock AppC
+ public void lockAppC(DelegateExecution execution) {
+
+ System.out.print("*****************************lockAppC*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("Lock",vfModuleId)
+
+
+ }
+ //run health check
+ public void healthCheckAppC(DelegateExecution execution) {
+
+ System.out.print("*****************************healthCheckAppC*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("HealthCheck",vfModuleId)
+
+ }
+ //SDNO health diagnostic
+ public void healthDiagnosticSDNO(DelegateExecution execution) {
+
+ System.out.print("*****************************healthDiagnosticSDNO is currently ignored*************************")
+ //SDNOValidatorImpl.healthDiagnostic("","");
+
+ }
+ //stop VF module controller
+ public void stopVfModuleController(DelegateExecution execution) {
+
+ System.out.print("*****************************stopVfModuleController*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("Stop",vfModuleId)
+
+
+ }
+
+ public void doUpdateVfModulePrep(DelegateExecution execution) {
+
+ System.out.print("*****************************doUpdateVfModulePrep*************************")
+ def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ //msoLogger.trace('Entered ' + method)
+
+ try {
+
+ //msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ //msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
+
+ }
+
+ }
+
+ public void completionHandlerPrep(DelegateExecution execution,String resultVar) {
+
+ System.out.print("*****************************completionHandlerPrep*************************")
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ //msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = getVariable(execution, 'UPDVfModI_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ //msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ //msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ //msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
+
+ }
+
+ }
+
+ public void healthCheckController(DelegateExecution execution) {
+
+ System.out.print("*****************************healthCheckController*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("HealthCheck",vfModuleId)
+
+ }
+
+ public void startVfModuleController(DelegateExecution execution) {
+
+ System.out.print("*****************************startVfModuleController*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("Start",vfModuleId)
+
+ }
+
+ public void vFFlagUnset(DelegateExecution execution) {
+
+ System.out.print("*****************************vFFlagUnset*************************")
+ String vnfId = (String)execution.getVariable('vnfId')
+ String uuid = (String)execution.getVariable('moduleUuid')
+ AAIValidatorImpl aaiVI = new AAIValidatorImpl()
+ aaiVI.updateVnfToUnLocked(vnfId,uuid);
+
+
+ }
+
+ public void unlockAppC(DelegateExecution execution) {
+
+ System.out.print("*****************************unlockAppC*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("Unlock",vfModuleId)
+
+ }
+
+ public void postUpgradeHealthCheckController(DelegateExecution execution) {
+
+ System.out.print("*****************************postUpgradeHealthCheckController*************************")
+ def vfModuleId = ""
+ ApplicationControllerClient aCC = new ApplicationControllerClient(getLCMProperties())
+ def status = aCC.runCommand("HealthCheck",vfModuleId)
+
+ }
+
+ Properties getLCMProperties() {
+ Properties properties = new Properties()
+
+ properties.put("topic.read", UrnPropertiesReader.getVariable("appc.client.topic.read.name"))
+ properties.put("topic.read.timeout", UrnPropertiesReader.getVariable("appc.client.topic.read.timeout"))
+ properties.put("client.response.timeout", UrnPropertiesReader.getVariable("appc.client.response.timeout"))
+ properties.put("topic.write", UrnPropertiesReader.getVariable("appc.client.topic.write"))
+ properties.put("poolMembers", UrnPropertiesReader.getVariable("appc.client.poolMembers"))
+ properties.put("client.key", UrnPropertiesReader.getVariable("appc.client.key"))
+ properties.put("client.secret", UrnPropertiesReader.getVariable("appc.client.secret"))
+ properties.put("client.name", "MSO")
+ properties.put("service", UrnPropertiesReader.getVariable("appc.client.service"))
+ return properties
+ }
+
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
new file mode 100644
index 0000000000..b7f31d7823
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -0,0 +1,445 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VfModuleBase
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+class UpdateVfModuleVolume extends VfModuleBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModuleVolume.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVfModVol_')
+ execution.setVariable('UPDVfModVol_Request', null)
+ execution.setVariable('UPDVfModVol_requestInfo', null)
+ execution.setVariable('UPDVfModVol_requestId', null)
+ execution.setVariable('UPDVfModVol_source', null)
+ execution.setVariable('UPDVfModVol_volumeInputs', null)
+ execution.setVariable('UPDVfModVol_volumeGroupId', null)
+ execution.setVariable('UPDVfModVol_vnfType', null)
+ execution.setVariable('UPDVfModVol_serviceId', null)
+ execution.setVariable('UPDVfModVol_aicCloudRegion', null)
+ execution.setVariable('UPDVfModVol_tenantId', null)
+ execution.setVariable('UPDVfModVol_volumeParams', null)
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', null)
+ execution.setVariable('UpdateVfModuleVolumeSuccessIndicator', false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ @Override
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ initProcessVariables(execution)
+ String request = validateRequest(execution)
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+ execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('UPDVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
+ execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+
+ def volumeParams = utils.getNodeXml(request, 'volume-params')
+ execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+
+ msoLogger.trace('Exited ' + method)
+ msoLogger.debug("UpdateVfModuleVolume request: " + request)
+ } catch (BpmnError bpmnError) {
+ throw bpmnError
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare and send the synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+
+ String synchResponse = """
+ <volume-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <start-time>${MsoUtils.xmlEscape(startTime)}</start-time>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+ msoLogger.debug("UpdateVfModuleVolume Synch Response: " + synchResponse)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for querying AAI for Volume Group information using the
+ * Volume Group Id and Aic Cloud Region.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVolumeGroup(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.queryAAIForVolumeGroup(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) +
+ '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/' + UriUtils.encode(aicCloudRegion, "UTF-8") +
+ '/volume-groups/volume-group/' + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ msoLogger.debug('Sending GET to AAI endpoint \'' + endPoint + '\'')
+ msoLogger.debug("UpdateVfModuleVolume sending GET for quering AAI endpoint: " + endPoint)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+ def int statusCode = response.getStatusCode()
+ def responseData = response.getResponseBodyAsString()
+ msoLogger.debug('Response code:' + statusCode)
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ msoLogger.debug("UpdateVfModuleVolume response data: " + responseData)
+
+ def volumeGroup = responseData
+ def heatStackId = getNodeTextForce(volumeGroup, 'heat-stack-id')
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+ if ((statusCode == 200) || (statusCode == 204)) {
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(volumeGroup)
+ if (volumeGroupTenantId == null) {
+ throw new Exception('Could not find Tenant Id element in Volume Group with Volume Group Id \'' + volumeGroupId + '\''
+ + '\', AIC Cloud Region \'' + aicCloudRegion + '\'')
+ }
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ msoLogger.debug('Received Tenant Id \'' + volumeGroupTenantId + '\' from AAI for Volume Group with Volume Group Id \'' + volumeGroupId + '\''
+ + '\', AIC Cloud Region \'' + aicCloudRegion + '\'')
+ } else if (statusCode == 404) {
+ throw new Exception('Volume Group \'' + volumeGroupId + '\' not found at AAI')
+ } else {
+ throw new Exception('Bad status code ' + statusCode + ' received from AAI; Response data: ' + responseData)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVolumeGroup(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow to do
+ * a Volume Group update.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def volumeGroupHeatStackId = execution.getVariable('UPDVfModVol_volumeGroupHeatStackId')
+ def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+
+ def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+ def volumeGroupParams = transformParamsToEntries(volumeParamsXml)
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
+ <vnfType>${MsoUtils.xmlEscape(vnfType)}</vnfType>
+ <vnfVersion></vnfVersion>
+ <vfModuleType></vfModuleType>
+ <volumeGroupParams>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ msoLogger.debug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest)
+
+ msoLogger.debug("UpdateVfModuleVolume Request for VNFAdapter Rest: " + vnfAdapterRestRequest)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDbInfraDbRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+
+ msoLogger.debug("UpdateVfModuleVolume Request for Updating DB for Infra: " + updateInfraRequest)
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepDbInfraDbRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepCompletionHandlerRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ msoLogger.debug('Request for Completion Handler:\n' + content)
+ msoLogger.debug("UpdateVfModuleVolume Completion Handler request: " + content)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepCompletionHandlerRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "FalloutHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepFalloutHandler(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug('Request for Fallout Handler:\n' + content)
+ msoLogger.debug("UpdateVfModuleVolume Fallout request: " + content)
+ execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepFalloutHandler(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.handleTenantIdMismatch(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String processKey = getProcessKey(execution);
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('UPDVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = 'TenantId \'' + tenantId + '\' in incoming request does not match Tenant Id \'' + volumeGroupTenantId +
+ '\' retrieved from AAI for Volume Group Id \'' + volumeGroupId + '\', AIC Cloud Region \'' + aicCloudRegion + '\''
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Error in UpdateVfModuleVol: ' + errorMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+
+ WorkflowException exception = new WorkflowException(processKey, 5000, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+
+ msoLogger.trace('Exited ' + method)
+ msoLogger.debug("UpdateVfModuleVolume workflowException in Tenant Mismatch: " + errorMessage)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
new file mode 100644
index 0000000000..7b2d1b78e4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -0,0 +1,561 @@
+/*-
+ * ============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.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.scripts.AaiUtil;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VfModuleBase;
+import org.onap.so.bpmn.common.scripts.VidUtils;
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+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 groovy.json.JsonSlurper
+
+class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVfModuleVolumeInfraV1.class);
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVfModVol_')
+ execution.setVariable('UPDVfModVol_Request', null)
+ execution.setVariable('UPDVfModVol_requestInfo', null)
+ execution.setVariable('UPDVfModVol_requestId', null)
+ execution.setVariable('UPDVfModVol_source', null)
+ execution.setVariable('UPDVfModVol_volumeInputs', null)
+ execution.setVariable('UPDVfModVol_volumeGroupId', null)
+ execution.setVariable('UPDVfModVol_vnfType', null)
+ execution.setVariable('UPDVfModVol_serviceId', null)
+ execution.setVariable('UPDVfModVol_aicCloudRegion', null)
+ execution.setVariable('UPDVfModVol_tenantId', null)
+ execution.setVariable('UPDVfModVol_volumeParams', null)
+ execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', null)
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', null)
+ execution.setVariable('UpdateVfModuleVolumeSuccessIndicator', false)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ public void preProcessRequest(DelegateExecution execution, isDebugLogEnabled) {
+
+ initProcessVariables(execution)
+ String jsonRequest = validateRequest(execution)
+
+ def request = ""
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(jsonRequest)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ //def vnfId = execution.getVariable('vnfId')
+
+ def vidUtils = new VidUtils(this)
+ request = vidUtils.createXmlVolumeRequest(reqMap, 'UPDATE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+
+ execution.setVariable('UPDVfModVol_Request', request)
+ execution.setVariable("UPDVfModVol_isVidRequest", true)
+
+ //need to get persona-model-id aka model-invariantId to use later to validate vf-module relation in AAI
+
+ def modelInvariantId = reqMap.requestDetails.modelInfo.modelInvariantUuid ?: ''
+ execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
+
+ msoLogger.debug("modelInvariantId from request: " + modelInvariantId)
+ msoLogger.debug("XML request:\n" + request)
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is in XML format.")
+ // assume request is in XML format - proceed as usual to process XML request
+ }
+
+ def requestId = execution.getVariable('mso-request-id')
+
+ def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+ execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+ execution.setVariable('UPDVfModVol_requestId', requestId)
+ //execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+ execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+ def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+ execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+ execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+ execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+ execution.setVariable('UPDVfModVol_vnfVersion', getRequiredNodeText(execution, volumeInputs, 'asdc-service-model-version'))
+ execution.setVariable('UPDVfModVol_serviceId', utils.getNodeText(volumeInputs, 'service-id'))
+ execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+ //execution.setVariable('UPDVfModVol_modelCustomizationId', getRequiredNodeText(execution, volumeInputs, 'model-customization-id'))
+
+ setBasicDBAuthHeader(execution, isDebugLogEnabled)
+
+ def volumeParams = utils.getNodeXml(request, 'volume-params')
+ execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+ }
+
+ /**
+ * Prepare and send the synchronous response.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution, isDebugLogEnabled) {
+
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+ def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+
+ String xmlSyncResponse = """
+ <volume-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${MsoUtils.xmlEscape(progress)}</progress>
+ <start-time>${MsoUtils.xmlEscape(startTime)}</start-time>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ def syncResponse = ''
+ def isVidRequest = execution.getVariable('UPDVfModVol_isVidRequest')
+
+ if(isVidRequest) {
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+ }
+ else {
+ syncResponse = utils.formatXml(xmlSyncResponse)
+ }
+
+ msoLogger.debug('Sync response: ' + syncResponse)
+ execution.setVariable('UPDVfModVol_syncResponseSent', true)
+ sendWorkflowResponse(execution, 200, syncResponse)
+ }
+
+ /**
+ * Prepare a Request for querying AAI for Volume Group information using the
+ * Volume Group Id and Aic Cloud Region.
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVolumeGroup(DelegateExecution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+ String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(aicCloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ msoLogger.debug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ msoLogger.debug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query volume group by id return code: " + returnCode)
+ msoLogger.debug("AAI query volume group by id response: " + aaiResponseAsString)
+
+ msoLogger.debug("AAI Volume Group return code: " + returnCode)
+ msoLogger.debug("AAI Volume Group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+
+ execution.setVariable('UPDVfModVol_aaiVolumeGroupResponse', aaiResponseAsString)
+ //def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+ //execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
+ + ", AIC Cloud Region " + aicCloudRegion)
+ }
+ execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ msoLogger.debug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion)
+
+ def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
+ msoLogger.debug("Related VF Module link: " + relatedVfModuleLink)
+ execution.setVariable('UPDVfModVol_relatedVfModuleLink', relatedVfModuleLink)
+
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group " + volumeGroupId + " not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void queryAAIForGenericVnf(DelegateExecution execution, isDebugEnabled) {
+
+ def vnfId = execution.getVariable('vnfId')
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+ def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+
+ msoLogger.debug("AAI query generic vnf request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query generic vnf return code: " + returnCode)
+ msoLogger.debug("AAI query generic vnf response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ msoLogger.debug('Generic vnf ' + vnfId + ' found in AAI.')
+ execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+ msoLogger.debug(message)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+
+ /**
+ * Query AAI for VF Module using vf-module-id
+ * @param execution
+ * @param isDebugLogEnabled
+ */
+ public void queryAAIForVfModule(DelegateExecution execution, isDebugLogEnabled) {
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
+ execution.setVariable('UPDVfModVol_personaModelId', '')
+
+ msoLogger.debug('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+ msoLogger.debug('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+
+ def aaiUrl = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ msoLogger.debug('A&AI URL: ' + aaiUrl)
+
+ def requestEndpoint = aaiUrl + queryAAIVfModuleRequest
+ msoLogger.debug('A&AI request endpoint: ' + requestEndpoint)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, requestEndpoint)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msoLogger.debug("AAI query vf-module: " + returnCode)
+ msoLogger.debug("AAI query vf-module response: " + aaiResponseAsString)
+
+ msoLogger.debug("AAI query vf-module:: " + returnCode)
+ msoLogger.debug("AAI query vf-module response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+ def personaModelId = utils.getNodeText(aaiResponseAsString, 'model-invariant-id')
+ if(personaModelId == null) {
+ //check old attribute name
+ personaModelId = utils.getNodeText(aaiResponseAsString, 'persona-model-id')
+ }
+ msoLogger.debug("vfModule personaModelId: " + personaModelId)
+ execution.setVariable('UPDVfModVol_personaModelId', personaModelId)
+ }
+ else if (returnCode == '404') {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "VF Module not found at AAI")
+ }
+ else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ /**
+ *
+ */
+ public String getRelatedVfModuleRelatedLink(xml) {
+ def list = new XmlSlurper().parseText(xml)
+ def vfModuleRelationship = list.'**'.find { node -> node.'related-to'.text() == 'vf-module' }
+ return vfModuleRelationship?.'related-link'?.text() ?: ''
+ }
+
+ /**
+ * Prepare a Request for invoking the VnfAdapterRest subflow to do
+ * a Volume Group update.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepVnfAdapterRest(DelegateExecution execution, isDebugLogEnabled) {
+
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+
+ def aaiVolumeGroupResponse = execution.getVariable('UPDVfModVol_aaiVolumeGroupResponse')
+ def volumeGroupHeatStackId = getNodeTextForce(aaiVolumeGroupResponse, 'heat-stack-id')
+ def volumeGroupName = getNodeTextForce(aaiVolumeGroupResponse, 'volume-group-name')
+ def modelCustomizationId = getNodeTextForce(aaiVolumeGroupResponse, 'vf-module-model-customization-id')
+ if(modelCustomizationId == null) {
+ // Check old attribute name
+ modelCustomizationId = getNodeTextForce(aaiVolumeGroupResponse, 'vf-module-persona-model-customization-id')
+ }
+
+ def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+ def vnfVersion = execution.getVariable('UPDVfModVol_vnfVersion')
+
+ def aaiGenericVnfResponse = execution.getVariable('UPDVfModVol_AAIQueryGenericVfnResponse')
+ def vnfId = utils.getNodeText(aaiGenericVnfResponse, 'vnf-id')
+ def vnfName = utils.getNodeText(aaiGenericVnfResponse, 'vnf-name')
+
+
+ def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+ def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
+ <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
+ <vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
+ <volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
+ <volumeGroupName>${MsoUtils.xmlEscape(volumeGroupName)}</volumeGroupName>
+ <volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
+ <vnfType>${MsoUtils.xmlEscape(vnfType)}</vnfType>
+ <vnfVersion>${MsoUtils.xmlEscape(vnfVersion)}</vnfVersion>
+ <vfModuleType></vfModuleType>
+ <modelCustomizationUuid>${MsoUtils.xmlEscape(modelCustomizationId)}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${MsoUtils.xmlEscape(vnfId)}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${MsoUtils.xmlEscape(vnfName)}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${MsoUtils.xmlEscape(volumeGroupId)}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${MsoUtils.xmlEscape(volumeGroupName)}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceId)}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${MsoUtils.xmlEscape(messageId)}</messageId>
+ <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ msoLogger.debug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest)
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(DelegateExecution execution, isDebugLogEnabled) {
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ ExceptionUtil exceptionUtil = new ExceptionUtil();
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ msoLogger.debug('Request for Update Infra Request:\n' + updateInfraRequest)
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(DelegateExecution execution, requestId, action, source, isDebugLogEnabled) {
+
+ String content = """
+ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ msoLogger.debug('Request for Completion Handler:\n' + content)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+ }
+
+
+ /**
+ * Build a "FalloutHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(DelegateExecution execution, isDebugLogEnabled) {
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+ def source = execution.getVariable('UPDVfModVol_source')
+
+ String requestInfo = """
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug('Request for Fallout Handler:\n' + content)
+ execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Tenant Id from
+ * AAI did not match the Tenant Id in the incoming request.
+ * @param execution The flow's execution instance.
+ */
+ public void handleTenantIdMismatch(DelegateExecution execution, isDebugLogEnabled) {
+
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+ def volumeGroupTenantId = execution.getVariable('UPDVfModVol_volumeGroupTenantId')
+
+ def String errorMessage = "TenantId " + tenantId + " in incoming request does not match Tenant Id " + volumeGroupTenantId +
+ " retrieved from AAI for Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Error in UpdateVfModuleVol: ' + errorMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+ /**
+ * Create a WorkflowException for the error case where the Personal Model Id from
+ * AAI did not match the model invariant ID in the incoming request.
+ * @param execution The flow's execution instance.
+ */
+ public void handlePersonaModelIdMismatch(DelegateExecution execution, isDebugLogEnabled) {
+
+ def modelInvariantId = execution.getVariable('UPDVfModVol_modelInvariantId')
+ def personaModelId = execution.getVariable('UPDVfModVol_personaModelId')
+
+ def String errorMessage = "Model Invariant ID " + modelInvariantId + " in incoming request does not match persona model ID " + personaModelId +
+ " retrieved from AAI for Volume Group Id "
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Error in UpdateVfModuleVol: ' + errorMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
new file mode 100644
index 0000000000..f251dc46f8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
@@ -0,0 +1,481 @@
+/*-
+ * ============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.onap.appc.client.lcm.model.Action;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.*
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class UpdateVnfInfra extends VnfCmBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UpdateVnfInfra.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "UPDVnfI_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'UPDVnfI_')
+ execution.setVariable('Request', null)
+ execution.setVariable('source', null)
+ execution.setVariable('vnfInputs', null)
+ execution.setVariable('tenantId', null)
+ execution.setVariable('vnfParams', null)
+ execution.setVariable('controllerType', null)
+ execution.setVariable('UpdateVnfSuccessIndicator', false)
+ execution.setVariable('serviceType', null)
+ execution.setVariable('nfRole', null)
+ execution.setVariable('currentActivity', 'UPDVnfI')
+ execution.setVariable('workStep', null)
+ execution.setVariable('failedActivity', null)
+ execution.setVariable('errorCode', "0")
+ execution.setVariable('errorText', null)
+ execution.setVariable('healthCheckIndex0', 0)
+ execution.setVariable('healthCheckIndex1', 1)
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", false)
+ execution.setVariable("rollbackVnfStop", false)
+ execution.setVariable("rollbackVnfLock", false)
+ execution.setVariable("rollbackQuiesceTraffic", false)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ execution.setVariable("isVidRequest", "true")
+ execution.setVariable('serviceType', 'Mobility')
+ execution.setVariable('actionLock', Action.Lock)
+ execution.setVariable('actionUnlock', Action.Unlock)
+ execution.setVariable('actionHealthCheck', Action.HealthCheck)
+ execution.setVariable('actionStart', Action.Start)
+ execution.setVariable('actionStop', Action.Stop)
+
+ def asdcServiceModelVersion = ''
+ def serviceModelInfo = null
+
+ def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ msoLogger.debug("PROCESSING SERVICE INFO")
+ asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+ serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
+ msoLogger.debug("ServiceModelInfo: " + serviceModelInfo)
+ def modelInvariant = jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid")
+ msoLogger.debug("modelInvariant: " + modelInvariant)
+ }
+
+ }
+ }
+
+ execution.setVariable('asdcServiceModelVersion', asdcServiceModelVersion)
+ execution.setVariable('serviceModelInfo', serviceModelInfo)
+ def vnfModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
+ execution.setVariable('vnfModelInfo', vnfModelInfo)
+ def vnfModelInvariantUuid = jsonUtils.getJsonValue(vnfModelInfo, "modelInvariantUuid")
+ execution.setVariable('vnfModelInvariantUuid', vnfModelInvariantUuid)
+ msoLogger.debug("vnfModelInvariantUuid: " + vnfModelInvariantUuid)
+
+ def vnfType = execution.getVariable('vnfType')
+ execution.setVariable('vnfType', vnfType)
+
+
+ def controllerType = reqMap.requestDetails?.requestParameters?.controllerType
+ execution.setVariable('controllerType', controllerType)
+
+ msoLogger.debug('Controller Type: ' + controllerType)
+
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> userParamsMap = [:]
+ if (userParams != null) {
+ userParams.each { userParam ->
+ userParamsMap.put(userParam.name, userParam.value.toString())
+ }
+ }
+
+ msoLogger.debug('Processed user params: ' + userParamsMap)
+
+ execution.setVariable('vfModuleInputParams', userParamsMap)
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable('requestId', requestId)
+ execution.setVariable('msoRequestId', requestId)
+
+
+ def vnfName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
+ execution.setVariable('vnfName', vnfName)
+
+ def requestorId = reqMap.requestDetails?.requestInfo?.requestorId ?: null
+ execution.setVariable('requestorId', requestorId)
+
+ def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
+ execution.setVariable('usePreload', usePreload)
+
+ def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
+ def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId
+ execution.setVariable('lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = cloudConfiguration.tenantId
+ execution.setVariable('tenantId', tenantId)
+
+ def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
+ execution.setVariable('globalSubscriberId', globalSubscriberId)
+
+ execution.setVariable('sdncVersion', '1702')
+
+ execution.setVariable("UpdateVnfInfraSuccessIndicator", false)
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable("source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("requestInfo", requestInfo)
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable("requestInfo"))
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('requestInfo')
+ def requestId = execution.getVariable('requestId')
+ def source = execution.getVariable('source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vnfId = execution.getVariable("vnfId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Get VnfResource decomposition object for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getVnfResourceDecomposition(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.getVnfResourceDecomposition(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String vnfModelInvariantUuid = execution.getVariable('vnfModelInvariantUuid')
+ msoLogger.debug("vnfModelInvariantUuid: " + vnfModelInvariantUuid)
+ List<VnfResource> vnfResources = serviceDecomposition.getVnfResources()
+
+ for (i in 0..vnfResources.size()-1) {
+ ModelInfo modelInfo = vnfResources[i].getModelInfo()
+ String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
+ msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
+
+ if (vnfModelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
+ VnfResource vnfResourceDecomposition = vnfResources[i]
+ execution.setVariable('vnfResourceDecomposition', vnfResourceDecomposition)
+ def nfRole = vnfResourceDecomposition.getNfRole()
+ execution.setVariable('nfRole', nfRole)
+ msoLogger.debug("vnfResourceDecomposition: " + vnfResourceDecomposition.toJsonString())
+ break
+ }
+ else {
+ //exception!
+ }
+
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if this VNF is already in maintenance in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfVnfInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfVnfInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkIfVnfInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("isInMaint result: " + isInMaint)
+ execution.setVariable('isVnfInMaintenance', isInMaint)
+
+ if (isInMaint) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "VNF is in maintenance in A&AI")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF's pservers are locked in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfPserversInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfPserversInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "checkIfPserversInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("areLocked result: " + areLocked)
+ execution.setVariable('arePserversLocked', areLocked)
+
+ if (areLocked) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "pServers are locked in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set inMaint flag for this VNF to the specified value in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param inMaint The boolean value of the flag to set
+ */
+ public void setVnfInMaintFlagInAAI(DelegateExecution execution, boolean inMaint) {
+ def method = getClass().getSimpleName() + '.setVnfInMaintFlagInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ if (inMaint) {
+ execution.setVariable("workStep", "setVnfInMaintFlagInAAI")
+ }
+ else {
+ execution.setVariable("workStep", "unsetVnfInMaintFlagInAAI")
+ }
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIUpdatorImpl aaiUpdator = new AAIUpdatorImpl()
+ aaiUpdator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ if (inMaint) {
+ aaiUpdator.updateVnfToLocked(vnfId, transactionLoggingUuid)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ aaiUpdator.updateVnfToUnLocked(vnfId, transactionLoggingUuid)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in setVnfInMaintFlagInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Prepare DoUpdateVnfAndModules call.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoUpdateVnfAndModules(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVnfAndModules(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "doUpdateVnfAndModules")
+ execution.setVariable("failedActivity", "MSO Update VNF")
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+
+ /**
+ * Handle Abort disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void abortProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.abortProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def errorText = execution.getVariable("errorText")
+ def errorCode = execution.getVariable("errorCode")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode as Integer, errorText)
+ }
+
+
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
new file mode 100644
index 0000000000..fd9d9cc8a3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -0,0 +1,835 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+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.appc.client.lcm.model.Action;
+import org.onap.appc.client.lcm.model.ActionIdentifiers
+import org.onap.appc.client.lcm.model.Flags
+import org.onap.appc.client.lcm.model.Status
+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.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.*
+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.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.client.appc.ApplicationControllerClient;
+import org.onap.so.client.appc.ApplicationControllerSupport;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonSlurper
+
+public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfCmBase.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "VnfIPU_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('requestInfo')
+ def requestId = execution.getVariable('requestId')
+ def source = execution.getVariable('source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vnfId = execution.getVariable("vnfId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Get VnfResource decomposition object for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getVnfResourceDecomposition(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.getVnfResourceDecomposition(' +
+ 'execution=' + execution.getId() +
+ ')'
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String vnfModelInvariantUuid = execution.getVariable('vnfModelInvariantUuid')
+ msoLogger.debug("vnfModelInvariantUuid: " + vnfModelInvariantUuid)
+ List<VnfResource> vnfResources = serviceDecomposition.getVnfResources()
+
+ for (i in 0..vnfResources.size()-1) {
+ ModelInfo modelInfo = vnfResources[i].getModelInfo()
+ String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
+ msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
+
+ if (vnfModelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
+ VnfResource vnfResourceDecomposition = vnfResources[i]
+ execution.setVariable('vnfResourceDecomposition', vnfResourceDecomposition)
+ def nfRole = vnfResourceDecomposition.getNfRole()
+ execution.setVariable('nfRole', nfRole)
+ msoLogger.debug("vnfResourceDecomposition: " + vnfResourceDecomposition.toJsonString())
+ break
+ }
+ else {
+ //exception!
+ }
+
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if this VNF is already in maintenance in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfVnfInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfVnfInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkIfVnfInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("isInMaint result: " + isInMaint)
+ execution.setVariable('isVnfInMaintenance', isInMaint)
+
+ if (isInMaint) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "VNF is in maintenance in A&AI")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Get VNF info from A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void queryAAIForVnf(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.queryAAIForVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("vnfId is: " + vnfId)
+ def cloudRegionId = execution.getVariable("lcpCloudRegionId")
+ msoLogger.debug("cloudRegionId is: " + cloudRegionId)
+
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ // Check if this VNF exists
+ if (!client.exists(genericVnfUri)) {
+ msoLogger.debug("VNF with vnfId " + vnfId + " does not exist in A&AI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "VNF with vnfId " + vnfId + " does not exist in A&AI")
+ }
+
+ AAIResultWrapper aaiRW = client.get(genericVnfUri)
+
+ Map<String, Object> result = aaiRW.asMap()
+
+ String vnfName = result.get("vnf-name")
+ msoLogger.debug("vnfName from A&AI is: " + vnfName)
+ execution.setVariable("vnfName", vnfName)
+ String nfRole = result.get("nf-role")
+ msoLogger.debug("nfRole from A&AI is: " + nfRole)
+ execution.setVariable("nfRole", nfRole)
+ String vnfHostIpAddress = result.get("ipv4-oam-address")
+ msoLogger.debug("vnfHostIpAddress from A&AI is: " + vnfHostIpAddress)
+ execution.setVariable("vnfHostIpAddress", vnfHostIpAddress)
+ execution.setVariable("vmIdList", null)
+ if (aaiRW.getRelationships() != null) {
+ Relationships relationships = aaiRW.getRelationships().get()
+ if (relationships != null) {
+
+ List<AAIResourceUri> vserverUris = relationships.getRelatedAAIUris(AAIObjectType.VSERVER)
+ JSONArray vserverIds = new JSONArray()
+ JSONArray vserverSelfLinks = new JSONArray()
+
+ for (AAIResourceUri j in vserverUris) {
+
+ String vserverId = j.getURIKeys().get('vserver-id')
+ String vserverJson = client.get(j).getJson()
+ msoLogger.debug("Retrieved vserverJson from AAI: " + vserverJson)
+ String vserverSelfLink = jsonUtils.getJsonValue(vserverJson, "vserver-selflink")
+
+ vserverIds.put(vserverId)
+ vserverSelfLinks.put(vserverSelfLink)
+ }
+
+ JSONObject vmidsArray = new JSONObject()
+ JSONObject vserveridsArray = new JSONObject()
+ vmidsArray.put("vmIds", vserverSelfLinks.toString())
+ vserveridsArray.put("vserverIds", vserverIds.toString())
+
+ msoLogger.debug("vmidsArray is: " + vmidsArray.toString())
+ msoLogger.debug("vserveridsArray is: " + vserveridsArray.toString())
+
+ execution.setVariable("vmIdList", vmidsArray.toString())
+ execution.setVariable("vserverIdList", vserveridsArray.toString())
+ }
+ }
+
+ if (cloudRegionId != null) {
+ AAIUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.DEFAULT_CLOUD_REGION, cloudRegionId)
+ // Check if this client region exists
+ if (!client.exists(cloudRegionUri)) {
+ msoLogger.debug("Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI")
+ }
+
+ AAIResultWrapper aaiRWCloud = client.get(cloudRegionUri)
+
+ Map<String, Object> resultCloud = aaiRWCloud.asMap()
+
+ String aicIdentity = resultCloud.get("identity-url")
+ msoLogger.debug("aicIdentity from A&AI is: " + aicIdentity)
+ execution.setVariable("aicIdentity", aicIdentity)
+ }
+ // preserve relationships if exist
+ Optional<Relationships> relationships = aaiRW.getRelationships()
+
+ if(relationships.isPresent()) {
+ msoLogger.debug("relationships are present")
+ String rs = relationships.get().getJson()
+ def jsonSlurper = new JsonSlurper()
+ def map = jsonSlurper.parseText(rs)
+ if (map instanceof Map) {
+ List<Map<String, Object>> relationshipsList = (List<Map<String, Object>>)map.get("relationship");
+ for (Map<String, Object> relationship : relationshipsList) {
+ final String relatedTo = (String)relationship.get("related-to");
+ if (relatedTo.equals("platform")) {
+ List<Map<String, Object>> relationshipDataList = (List<Map<String, Object>>)relationship.get("relationship-data")
+ msoLogger.debug("Found platform entry")
+ for (Map<String, Object> relationshipData : relationshipDataList) {
+ String relationshipKey = (String)relationshipData.get("relationship-key");
+ if (relationshipKey.equals("platform.platform-name")) {
+ String platformName = (String) relationshipData.get("relationship-value")
+ msoLogger.debug("platform from A&AI is: " + platformName)
+ execution.setVariable("platform", platformName)
+ break
+ }
+ }
+ }
+ if (relatedTo.equals("line-of-business")) {
+ List<Map<String, Object>> relationshipDataList = (List<Map<String, Object>>)relationship.get("relationship-data")
+ msoLogger.debug("Found line-of-business entry")
+ for (Map<String, Object> relationshipData : relationshipDataList) {
+ String relationshipKey = (String)relationshipData.get("relationship-key");
+ if (relationshipKey.equals("line-of-business.line-of-business-name")) {
+ String lineOfBusinessName = (String) relationshipData.get("relationship-value")
+ msoLogger.debug("lineOfBusiness from A&AI is: " + lineOfBusinessName)
+ execution.setVariable("lineOfBusiness", lineOfBusinessName)
+ break
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVnf(): ' + e.getMessage())
+ }
+ }
+
+
+
+ /**
+ * Check if this VNF's pservers are locked in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfPserversInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfPserversInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "checkIfPserversInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("areLocked result: " + areLocked)
+ execution.setVariable('arePserversLocked', areLocked)
+
+ if (areLocked) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "pServers are locked in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set inMaint flag for this VNF to the specified value in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param inMaint The boolean value of the flag to set
+ */
+ public void setVnfInMaintFlagInAAI(DelegateExecution execution, boolean inMaint) {
+ def method = getClass().getSimpleName() + '.setVnfInMaintFlagInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ if (inMaint) {
+ execution.setVariable("workStep", "setVnfInMaintFlagInAAI")
+ }
+ else {
+ execution.setVariable("workStep", "unsetVnfInMaintFlagInAAI")
+ }
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIUpdatorImpl aaiUpdator = new AAIUpdatorImpl()
+ aaiUpdator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ if (inMaint) {
+ aaiUpdator.updateVnfToLocked(vnfId, transactionLoggingUuid)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ aaiUpdator.updateVnfToUnLocked(vnfId, transactionLoggingUuid)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in setVnfInMaintFlagInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if VF Closed Loop Disabled in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfClosedLoopDisabledInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkClosedLoopDisabledFlagInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("vnfId is: " + vnfId)
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ AAIResultWrapper aaiRW = client.get(genericVnfUri)
+ Map<String, Object> result = aaiRW.asMap()
+ boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
+
+ msoLogger.debug("isClosedLoopDisabled result: " + isClosedLoopDisabled)
+ execution.setVariable('isClosedLoopDisabled', isClosedLoopDisabled)
+
+ if (isClosedLoopDisabled) {
+ execution.setVariable("errorCode", "1004")
+ execution.setVariable("errorText", "closedLoop is disabled in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+ /**
+ * Set VF Closed Loop Disabled Flag in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void setClosedLoopDisabledInAAI(DelegateExecution execution, boolean setDisabled) {
+ def method = getClass().getSimpleName() + '.setClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ if (setDisabled) {
+ execution.setVariable("workStep", "setClosedLoopDisabledFlagInAAI")
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", true)
+ }
+ else {
+ execution.setVariable("workStep", "unsetClosedLoopDisabledFlagInAAI")
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", false)
+ }
+
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+
+ Map<String, Boolean> request = new HashMap<>()
+ request.put("is-closed-loop-disabled", setDisabled)
+ client.update(genericVnfUri, request)
+ msoLogger.debug("set isClosedLoop to: " + setDisabled)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+
+
+
+ /**
+ * Call APP-C client to execute specified APP-C command for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param action The action to take in APP-C.
+ */
+ public void runAppcCommand(DelegateExecution execution, Action action) {
+ def method = getClass().getSimpleName() + '.runAppcCommand(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+
+ ApplicationControllerClient appcClient = null
+
+ try {
+ msoLogger.debug("Running APP-C action: " + action.toString())
+ String vnfId = execution.getVariable('vnfId')
+ String msoRequestId = execution.getVariable('requestId')
+ execution.setVariable('msoRequestId', msoRequestId)
+ execution.setVariable("failedActivity", "APP-C")
+
+ appcClient = new ApplicationControllerClient()
+ ApplicationControllerSupport support = new ApplicationControllerSupport()
+ appcClient.appCSupport=support
+ org.springframework.test.util.ReflectionTestUtils.setField(support, "lcmModelPackage", "org.onap.appc.client.lcm.model");
+ Flags flags = new Flags();
+ ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
+ actionIdentifiers.setVnfId(vnfId);
+ Status appcStatus
+ switch(action) {
+ case Action.Lock:
+ execution.setVariable('workStep', "LockVNF")
+ appcStatus = appcClient.runCommand(Action.Lock,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Unlock:
+ execution.setVariable('workStep', "UnlockVNF")
+ appcStatus = appcClient.runCommand(Action.Unlock,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.HealthCheck:
+ def healthCheckIndex = execution.getVariable('healthCheckIndex')
+ execution.setVariable('workStep', "HealthCheckVNF" + healthCheckIndex)
+ execution.setVariable('healthCheckIndex', healthCheckIndex + 1)
+ appcStatus = appcClient.runCommand(Action.HealthCheck,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Start:
+ execution.setVariable('workStep', "StartVNF")
+ appcStatus = appcClient.runCommand(Action.Start,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Stop:
+ execution.setVariable('workStep', "StopVNF")
+ appcStatus = appcClient.runCommand(Action.Stop,actionIdentifiers,null,msoRequestId)
+ break
+ default:
+ break
+ }
+ msoLogger.debug("Completed AppC request")
+ int appcCode = appcStatus.getCode()
+ msoLogger.debug("AppC status code is: " + appcCode)
+ msoLogger.debug("AppC status message is: " + appcStatus.getMessage())
+ if (support.getCategoryOf(appcStatus) == ApplicationControllerSupport.StatusCategory.ERROR) {
+ execution.setVariable("errorCode", Integer.toString(appcCode))
+ execution.setVariable("errorText", appcStatus.getMessage())
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+
+ } catch (java.lang.NoSuchMethodError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+
+ }
+ }
+
+ /**
+ * Placeholder for a call to APP-C client to execute specified APP-C command for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param action The action to take in APP-C.
+ */
+ public void runAppcCommandPlaceholder(DelegateExecution execution, String action) {
+ def method = getClass().getSimpleName() + '.runAppcCommandPlaceholder(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("failedActivity", "APP-C")
+ execution.setVariable("workStep", action)
+ }
+
+
+
+
+
+
+
+ /**
+ * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void completionHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+
+ def requestInfo = execution.getVariable('requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:status-message>Vnf has been updated successfully.</sdncadapterworkflow:status-message>
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Prepare DoUpdateVnfAndModules call.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDoUpdateVnfAndModules(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVnfAndModules(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "doUpdateVnfAndModules")
+ execution.setVariable("failedActivity", "MSO Update VNF")
+ msoLogger.trace('Exited ' + method)
+
+ }
+
+ /**
+ * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+ *
+ * @param execution the execution
+ * @param resultVar the execution variable in which the result will be stored
+ */
+ public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+ def requestInformation = execution.getVariable("requestInfo")
+
+ def WorkflowException workflowException = execution.getVariable("WorkflowException")
+ def errorResponseCode = workflowException.getErrorCode()
+ def errorResponseMsg = workflowException.getErrorMessage()
+ def encErrorResponseMsg = ""
+ if (errorResponseMsg != null) {
+ encErrorResponseMsg = errorResponseMsg
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:reqtype="http://org.onap/so/request/types/v1"
+ xmlns:msoservtypes="http://org.onap/so/request/types/v1"
+ xmlns:structuredtypes="http://org.onap/so/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${MsoUtils.xmlEscape(encErrorResponseMsg)}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${MsoUtils.xmlEscape(errorResponseCode)}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ msoLogger.debug(resultVar + ' = ' + System.lineSeparator() + content)
+ execution.setVariable(resultVar, content)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+
+ /**
+ * Handle Abort disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void abortProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.abortProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def errorText = execution.getVariable("errorText")
+ def errorCode = execution.getVariable("errorCode")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode as Integer, errorText)
+ }
+
+ /**
+ * Increment Retry Count for Current Work Step
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void incrementRetryCount(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.incrementRetryCount(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String retryCountVariableName = execution.getVariable("workStep") + "RetryCount"
+ execution.setVariable("retryCountVariableName", retryCountVariableName)
+
+ def retryCountVariable = execution.getVariable(retryCountVariableName)
+ int retryCount = 0
+
+ if (retryCountVariable != null) {
+ retryCount = (int) retryCountVariable
+ }
+
+ retryCount += 1
+
+ execution.setVariable(retryCountVariableName, retryCount)
+
+ msoLogger.debug("value of " + retryCountVariableName + " is " + retryCount)
+ msoLogger.trace('Exited ' + method)
+
+
+ }
+
+
+ public void preProcessRollback (DelegateExecution execution) {
+ msoLogger.trace("preProcessRollback ")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback ")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+ msoLogger.trace("postProcessRollback ")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit postProcessRollback ")
+ }
+
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
new file mode 100644
index 0000000000..8ca2871916
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
@@ -0,0 +1,483 @@
+/*-
+ * ============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.onap.appc.client.lcm.model.Action;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.*
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class VnfConfigUpdate extends VnfCmBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfConfigUpdate.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "VnfIPU_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'VnfCU_')
+ execution.setVariable('Request', null)
+ execution.setVariable('source', null)
+ execution.setVariable('controllerType', null)
+ execution.setVariable('UpdateVnfSuccessIndicator', false)
+ execution.setVariable('serviceType', null)
+ execution.setVariable('nfRole', null)
+ execution.setVariable('currentActivity', 'VnfCU')
+ execution.setVariable('workStep', null)
+ execution.setVariable('failedActivity', null)
+ execution.setVariable('errorCode', "0")
+ execution.setVariable('errorText', null)
+ execution.setVariable('healthCheckIndex0', 0)
+ execution.setVariable('healthCheckIndex1', 1)
+ execution.setVariable('maxRetryCount', 3)
+ execution.setVariable('retryCount', 0)
+ execution.setVariable("lcpCloudRegionId", null)
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", false)
+ execution.setVariable("rollbackVnfStop", false)
+ execution.setVariable("rollbackVnfLock", false)
+ execution.setVariable("rollbackQuiesceTraffic", false)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ execution.setVariable('serviceInstanceId', serviceInstanceId)
+ execution.setVariable('vnfId', vnfId)
+ execution.setVariable('serviceType', 'Mobility')
+ execution.setVariable('payload', "")
+ execution.setVariable('actionHealthCheck', Action.HealthCheck)
+ execution.setVariable('actionConfigModify', Action.ConfigModify)
+
+
+ def controllerType = reqMap.requestDetails?.requestParameters?.controllerType
+ execution.setVariable('controllerType', controllerType)
+
+ msoLogger.debug('Controller Type: ' + controllerType)
+
+ def payload = reqMap.requestDetails?.requestParameters?.payload
+ execution.setVariable('payload', payload)
+
+ msoLogger.debug('Processed payload: ' + payload)
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable('requestId', requestId)
+ execution.setVariable('msoRequestId', requestId)
+
+ def requestorId = reqMap.requestDetails?.requestInfo?.requestorId ?: null
+ execution.setVariable('requestorId', requestorId)
+
+ execution.setVariable('sdncVersion', '1702')
+
+ execution.setVariable("UpdateVnfInfraSuccessIndicator", false)
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable("source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("requestInfo", requestInfo)
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable("requestInfo"))
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('requestInfo')
+ def requestId = execution.getVariable('requestId')
+ def source = execution.getVariable('source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vnfId = execution.getVariable("vnfId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF is already in maintenance in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfVnfInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfVnfInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkIfVnfInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("isInMaint result: " + isInMaint)
+ execution.setVariable('isVnfInMaintenance', isInMaint)
+
+ if (isInMaint) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "VNF is in maintenance in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF's pservers are locked in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfPserversInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfPserversInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "checkIfPserversInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("areLocked result: " + areLocked)
+ execution.setVariable('arePserversLocked', areLocked)
+
+ if (areLocked) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "pServers are locked in A&AI")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set inMaint flag for this VNF to the specified value in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param inMaint The boolean value of the flag to set
+ */
+ public void setVnfInMaintFlagInAAI(DelegateExecution execution, boolean inMaint) {
+ def method = getClass().getSimpleName() + '.setVnfInMaintFlagInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ if (inMaint) {
+ execution.setVariable("workStep", "setVnfInMaintFlagInAAI")
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ execution.setVariable("workStep", "unsetVnfInMaintFlagInAAI")
+ }
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIUpdatorImpl aaiUpdator = new AAIUpdatorImpl()
+ aaiUpdator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ if (inMaint) {
+ aaiUpdator.updateVnfToLocked(vnfId, transactionLoggingUuid)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ aaiUpdator.updateVnfToUnLocked(vnfId, transactionLoggingUuid)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in setVnfInMaintFlagInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if VF Closed Loop Disabled in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfClosedLoopDisabledInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkClosedLoopDisabledFlagInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("vnfId is: " + vnfId)
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ AAIResultWrapper aaiRW = client.get(genericVnfUri)
+ Map<String, Object> result = aaiRW.asMap()
+ boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
+
+ msoLogger.debug("isClosedLoopDisabled result: " + isClosedLoopDisabled)
+ execution.setVariable('isClosedLoopDisabled', isClosedLoopDisabled)
+
+ if (isClosedLoopDisabled) {
+ execution.setVariable("errorCode", "1004")
+ execution.setVariable("errorText", "closedLoop is disabled in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set VF Closed Loop Disabled Flag in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void setClosedLoopDisabledInAAI(DelegateExecution execution, boolean setDisabled) {
+ def method = getClass().getSimpleName() + '.setClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ if (setDisabled) {
+ execution.setVariable("workStep", "setClosedLoopDisabledFlagInAAI")
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", true)
+ }
+ else {
+ execution.setVariable("workStep", "unsetClosedLoopDisabledFlagInAAI")
+ }
+
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+
+ Map<String, Boolean> request = new HashMap<>()
+ request.put("is-closed-loop-disabled", setDisabled)
+ client.update(genericVnfUri, request)
+ msoLogger.debug("set isClosedLoop to: " + setDisabled)
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Handle Abort disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void abortProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.abortProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def errorText = execution.getVariable("errorText")
+ def errorCode = execution.getVariable("errorCode")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode as Integer, errorText)
+ }
+
+ /**
+ * Increment Retry Count for Current Work Step
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void incrementRetryCount(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.incrementRetryCount(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String retryCountVariableName = execution.getVariable("workStep") + "RetryCount"
+ execution.setVariable("retryCountVariableName", retryCountVariableName)
+
+ def retryCountVariable = execution.getVariable(retryCountVariableName)
+ int retryCount = 0
+
+ if (retryCountVariable != null) {
+ retryCount = (int) retryCountVariable
+ }
+
+ retryCount += 1
+
+ execution.setVariable(retryCountVariableName, retryCount)
+
+ msoLogger.debug("value of " + retryCountVariableName + " is " + retryCount)
+ msoLogger.trace('Exited ' + method)
+
+
+ }
+
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
new file mode 100644
index 0000000000..68d5c19b80
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
@@ -0,0 +1,599 @@
+/*-
+ * ============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.onap.appc.client.lcm.model.Action
+import org.onap.appc.client.lcm.model.ActionIdentifiers
+import org.onap.appc.client.lcm.model.Flags
+import org.onap.appc.client.lcm.model.Status
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.*
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.client.appc.ApplicationControllerClient;
+import org.onap.so.client.appc.ApplicationControllerSupport;
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+import groovy.json.JsonOutput
+import groovy.json.JsonSlurper
+
+public class VnfInPlaceUpdate extends VnfCmBase {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfInPlaceUpdate.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtils = new JsonUtils()
+ def prefix = "VnfIPU_"
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(DelegateExecution execution) {
+ execution.setVariable('prefix', 'VnfIPU_')
+ execution.setVariable('Request', null)
+ execution.setVariable('requestInfo', null)
+ execution.setVariable('source', null)
+ execution.setVariable('vnfInputs', null)
+ execution.setVariable('tenantId', null)
+ execution.setVariable('vnfParams', null)
+ execution.setVariable('controllerType', null)
+ execution.setVariable('UpdateVnfSuccessIndicator', false)
+ execution.setVariable('serviceType', null)
+ execution.setVariable('nfRole', null)
+ execution.setVariable('currentActivity', 'VnfIPU')
+ execution.setVariable('workStep', null)
+ execution.setVariable('failedActivity', null)
+ execution.setVariable('errorCode', "0")
+ execution.setVariable('errorText', null)
+ execution.setVariable('healthCheckIndex0', 0)
+ execution.setVariable('healthCheckIndex1', 1)
+ execution.setVariable('maxRetryCount', 3)
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", false)
+ execution.setVariable("rollbackVnfStop", false)
+ execution.setVariable("rollbackVnfLock", false)
+ execution.setVariable("rollbackQuiesceTraffic", false)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", false)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ initProcessVariables(execution)
+
+ msoLogger.trace('Entered ' + method)
+
+ initProcessVariables(execution)
+
+ def incomingRequest = execution.getVariable('bpmnRequest')
+
+ msoLogger.debug("Incoming Infra Request: " + incomingRequest)
+ try {
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ Map reqMap = jsonSlurper.parseText(incomingRequest)
+ msoLogger.debug(" Request is in JSON format.")
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ execution.setVariable('serviceInstanceId', serviceInstanceId)
+ execution.setVariable('vnfId', vnfId)
+ execution.setVariable("isVidRequest", "true")
+ execution.setVariable('serviceType', 'Mobility')
+ execution.setVariable('payload', "")
+ execution.setVariable('actionSnapshot', Action.Snapshot)
+ execution.setVariable('actionLock', Action.Lock)
+ execution.setVariable('actionUnlock', Action.Unlock)
+ execution.setVariable('actionUpgradePreCheck', Action.UpgradePreCheck)
+ execution.setVariable('actionUpgradePostCheck', Action.UpgradePostCheck)
+ execution.setVariable('actionQuiesceTraffic', Action.QuiesceTraffic)
+ execution.setVariable('actionUpgradeBackup', Action.UpgradeBackup)
+ execution.setVariable('actionUpgradeSoftware', Action.UpgradeSoftware)
+ execution.setVariable('actionResumeTraffic', Action.ResumeTraffic)
+
+
+ def controllerType = reqMap.requestDetails?.requestParameters?.controllerType
+ execution.setVariable('controllerType', controllerType)
+
+ msoLogger.debug('Controller Type: ' + controllerType)
+
+ def payload = reqMap.requestDetails?.requestParameters?.payload
+ execution.setVariable('payload', payload)
+
+ msoLogger.debug('Processed payload: ' + payload)
+
+
+ def requestId = execution.getVariable("mso-request-id")
+ execution.setVariable('requestId', requestId)
+ execution.setVariable('msoRequestId', requestId)
+
+ def requestorId = reqMap.requestDetails?.requestInfo?.requestorId ?: null
+ execution.setVariable('requestorId', requestorId)
+
+ def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
+ def lcpCloudRegionId = cloudConfiguration.lcpCloudRegionId
+ execution.setVariable('lcpCloudRegionId', lcpCloudRegionId)
+ def tenantId = cloudConfiguration.tenantId
+ execution.setVariable('tenantId', tenantId)
+
+ execution.setVariable("UpdateVnfInfraSuccessIndicator", false)
+
+
+
+ def source = reqMap.requestDetails?.requestInfo?.source
+ execution.setVariable("source", source)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>UPDATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable("requestInfo", requestInfo)
+
+ msoLogger.debug('RequestInfo: ' + execution.getVariable("requestInfo"))
+
+ msoLogger.trace('Exited ' + method)
+
+ }
+ catch(groovy.json.JsonException je) {
+ msoLogger.debug(" Request is not in JSON format.")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+ }
+ catch(Exception e) {
+ String restFaultMessage = e.getMessage()
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
+ }
+ }
+
+ /**
+ * Prepare and send the sychronous response for this flow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void sendSynchResponse(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+
+ try {
+ def requestInfo = execution.getVariable('requestInfo')
+ def requestId = execution.getVariable('requestId')
+ def source = execution.getVariable('source')
+ def progress = getNodeTextForce(requestInfo, 'progress')
+ if (progress.isEmpty()) {
+ progress = '0'
+ }
+ def startTime = getNodeTextForce(requestInfo, 'start-time')
+ if (startTime.isEmpty()) {
+ startTime = System.currentTimeMillis()
+ }
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ def vnfId = execution.getVariable("vnfId")
+ String synchResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF is already in maintenance in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfVnfInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfVnfInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkIfVnfInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("isInMaint result: " + isInMaint)
+ execution.setVariable('isVnfInMaintenance', isInMaint)
+
+ if (isInMaint) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "VNF is in maintenance in A&AI")
+ }
+
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+
+ /**
+ * Check if this VNF's pservers are locked in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfPserversInMaintInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfPserversInMaintInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("workStep", "checkIfPserversInMaintInAAI")
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
+ aaiValidator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+ msoLogger.debug("areLocked result: " + areLocked)
+ execution.setVariable('arePserversLocked', areLocked)
+
+ if (areLocked) {
+ execution.setVariable("errorCode", "1003")
+ execution.setVariable("errorText", "pServers are locked in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Set inMaint flag for this VNF to the specified value in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param inMaint The boolean value of the flag to set
+ */
+ public void setVnfInMaintFlagInAAI(DelegateExecution execution, boolean inMaint) {
+ def method = getClass().getSimpleName() + '.setVnfInMaintFlagInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ if (inMaint) {
+ execution.setVariable("workStep", "setVnfInMaintFlagInAAI")
+ }
+ else {
+ execution.setVariable("workStep", "unsetVnfInMaintFlagInAAI")
+ }
+ execution.setVariable("failedActivity", "AAI")
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ AAIRestClientImpl client = new AAIRestClientImpl()
+ AAIUpdatorImpl aaiUpdator = new AAIUpdatorImpl()
+ aaiUpdator.setClient(client)
+ def vnfId = execution.getVariable("vnfId")
+ if (inMaint) {
+ aaiUpdator.updateVnfToLocked(vnfId, transactionLoggingUuid)
+ execution.setVariable("rollbackSetVnfInMaintenanceFlag", true)
+ }
+ else {
+ aaiUpdator.updateVnfToUnLocked(vnfId, transactionLoggingUuid)
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in setVnfInMaintFlagInAAI(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Check if VF Closed Loop Disabled in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void checkIfClosedLoopDisabledInAAI(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.checkIfClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ execution.setVariable("workStep", "checkClosedLoopDisabledFlagInAAI")
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ msoLogger.debug("vnfId is: " + vnfId)
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+ AAIResultWrapper aaiRW = client.get(genericVnfUri)
+ Map<String, Object> result = aaiRW.asMap()
+ boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
+
+ msoLogger.debug("isClosedLoopDisabled result: " + isClosedLoopDisabled)
+ execution.setVariable('isClosedLoopDisabled', isClosedLoopDisabled)
+
+ if (isClosedLoopDisabled) {
+ execution.setVariable("errorCode", "1004")
+ execution.setVariable("errorText", "closedLoop is disabled in A&AI")
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+ /**
+ * Set VF Closed Loop Disabled Flag in A&AI.
+ *
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void setClosedLoopDisabledInAAI(DelegateExecution execution, boolean setDisabled) {
+ def method = getClass().getSimpleName() + '.setClosedLoopDisabledInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ if (setDisabled) {
+ execution.setVariable("workStep", "setClosedLoopDisabledFlagInAAI")
+ execution.setVariable("rollbackSetClosedLoopDisabledFlag", true)
+ }
+ else {
+ execution.setVariable("workStep", "unsetClosedLoopDisabledFlagInAAI")
+ }
+
+ execution.setVariable("failedActivity", "AAI")
+ msoLogger.trace('Entered ' + method)
+
+ try {
+ def transactionLoggingUuid = UUID.randomUUID().toString()
+ def vnfId = execution.getVariable("vnfId")
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+
+ Map<String, Boolean> request = new HashMap<>()
+ request.put("is-closed-loop-disabled", setDisabled)
+ client.update(genericVnfUri, request)
+ msoLogger.debug("set isClosedLoop to: " + setDisabled)
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+
+
+
+ /**
+ * Call APP-C client to execute specified APP-C command for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param action The action to take in APP-C.
+ */
+ public void runAppcCommand(DelegateExecution execution, Action action) {
+ def method = getClass().getSimpleName() + '.runAppcCommand(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+
+ ApplicationControllerClient appcClient = null
+
+ try {
+ msoLogger.debug("Running APP-C action: " + action.toString())
+ String vnfId = execution.getVariable('vnfId')
+ String msoRequestId = execution.getVariable('requestId')
+ execution.setVariable('msoRequestId', msoRequestId)
+ execution.setVariable("failedActivity", "APP-C")
+
+ appcClient = new ApplicationControllerClient()
+ ApplicationControllerSupport support = new ApplicationControllerSupport()
+ appcClient.appCSupport=support
+ org.springframework.test.util.ReflectionTestUtils.setField(support, "lcmModelPackage", "org.onap.appc.client.lcm.model");
+ Flags flags = new Flags();
+ ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
+ actionIdentifiers.setVnfId(vnfId);
+ Status appcStatus
+ switch(action) {
+ case Action.Lock:
+ execution.setVariable('workStep', "LockVNF")
+ appcStatus = appcClient.runCommand(Action.Lock,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Unlock:
+ execution.setVariable('workStep', "UnlockVNF")
+ appcStatus = appcClient.runCommand(Action.Unlock,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.HealthCheck:
+ def healthCheckIndex = execution.getVariable('healthCheckIndex')
+ execution.setVariable('workStep', "HealthCheckVNF" + healthCheckIndex)
+ execution.setVariable('healthCheckIndex', healthCheckIndex + 1)
+ appcStatus = appcClient.runCommand(Action.HealthCheck,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Start:
+ execution.setVariable('workStep', "StartVNF")
+ appcStatus = appcClient.runCommand(Action.Start,actionIdentifiers,null,msoRequestId)
+ break
+ case Action.Stop:
+ execution.setVariable('workStep', "StopVNF")
+ appcStatus = appcClient.runCommand(Action.Stop,actionIdentifiers,null,msoRequestId)
+ break
+ default:
+ break
+ }
+ msoLogger.debug("Completed AppC request")
+ int appcCode = appcStatus.getCode()
+ msoLogger.debug("AppC status code is: " + appcCode)
+ msoLogger.debug("AppC status message is: " + appcStatus.getMessage())
+ if (support.getCategoryOf(appcStatus) == ApplicationControllerSupport.StatusCategory.ERROR) {
+ execution.setVariable("errorCode", Integer.toString(appcCode))
+ execution.setVariable("errorText", appcStatus.getMessage())
+ }
+
+ msoLogger.trace('Exited ' + method)
+ } catch (BpmnError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ } catch (java.lang.NoSuchMethodError e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ execution.setVariable("errorCode", "1002")
+ execution.setVariable("errorText", e.getMessage())
+ }
+ }
+
+ /**
+ * Placeholder for a call to APP-C client to execute specified APP-C command for this VNF.
+ *
+ *
+ * @param execution The flow's execution instance.
+ * @param action The action to take in APP-C.
+ */
+ public void runAppcCommandPlaceholder(DelegateExecution execution, String action) {
+ def method = getClass().getSimpleName() + '.runAppcCommandPlaceholder(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ execution.setVariable('errorCode', "0")
+ msoLogger.trace('Entered ' + method)
+ execution.setVariable("failedActivity", "APP-C")
+ execution.setVariable("workStep", action)
+ }
+
+
+
+ /**
+ * Handle Abort disposition from RainyDayHandler
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void abortProcessing(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.abortProcessing(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ def errorText = execution.getVariable("errorText")
+ def errorCode = execution.getVariable("errorCode")
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode as Integer, errorText)
+ }
+
+ /**
+ * Increment Retry Count for Current Work Step
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void incrementRetryCount(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.incrementRetryCount(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ msoLogger.trace('Entered ' + method)
+
+ String retryCountVariableName = execution.getVariable("workStep") + "RetryCount"
+ execution.setVariable("retryCountVariableName", retryCountVariableName)
+
+ def retryCountVariable = execution.getVariable(retryCountVariableName)
+ int retryCount = 0
+
+ if (retryCountVariable != null) {
+ retryCount = (int) retryCountVariable
+ }
+
+ retryCount += 1
+
+ execution.setVariable(retryCountVariableName, retryCount)
+
+ msoLogger.debug("value of " + retryCountVariableName + " is " + retryCount)
+ msoLogger.trace('Exited ' + method)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
new file mode 100644
index 0000000000..86c5f65e8c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -0,0 +1,814 @@
+/*
+ * ============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.vcpe.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.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.*
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.springframework.web.util.UriUtils;
+
+import groovy.json.*
+
+
+
+/**
+ * This groovy class supports the <class>CreateVcpeResCustService.bpmn</class> process.
+ *
+ * @author ek1439
+ *
+ */
+public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateVcpeResCustService.class);
+
+ private static final String DebugFlag = "isDebugLogEnabled"
+
+ String Prefix = "CVRCS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution) {
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("createVcpeServiceRequest", "")
+ execution.setVariable("globalSubscriberId", "")
+ execution.setVariable("serviceInstanceName", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable(Prefix + "VnfsCreatedCount", 0)
+ execution.setVariable("productFamilyId", "")
+ execution.setVariable("brgWanMacAddress", "")
+ execution.setVariable("customerLocation", "")
+ execution.setVariable("homingService", "")
+ execution.setVariable("cloudOwner", "")
+ execution.setVariable("cloudRegionId", "")
+ execution.setVariable("homingModelIds", "")
+
+ //TODO
+ execution.setVariable("sdncVersion", "1707")
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside preProcessRequest CreateVcpeResCustService Request ")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ //Config Inputs
+ String aaiDistDelay = execution.getVariable('URN_mso_workflow_aai_distribution_delay')
+ if (isBlank(aaiDistDelay)) {
+ msg = "URN_mso_workflow_aai_distribution_delay is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("aaiDistDelay", aaiDistDelay)
+ msoLogger.debug("AAI distribution delay: " + aaiDistDelay)
+
+ // check for incoming json message/input
+ String createVcpeServiceRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(createVcpeServiceRequest)
+ execution.setVariable("createVcpeServiceRequest", createVcpeServiceRequest);
+ println 'createVcpeServiceRequest - ' + createVcpeServiceRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ msoLogger.debug(" Generated new Service Instance: " + serviceInstanceId)
+ } else {
+ msoLogger.debug("Using provided Service Instance ID: " + serviceInstanceId)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId, "UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+ utils.log("DEBUG", "Incoming serviceInstanceName is: " + serviceInstanceName, isDebugEnabled)
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+
+ String source = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ source = "VID"
+ }
+ execution.setVariable("source", source)
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // verify element global-customer-id is sent from JSON input, throw exception if missing
+ if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
+ String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+ }
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ msoLogger.debug("Incoming subscriptionServiceType is: " + subscriptionServiceType)
+
+ String suppressRollback = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ msoLogger.debug("Incoming Suppress/Disable Rollback is: " + suppressRollback)
+
+ String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ msoLogger.debug("Incoming productFamilyId is: " + productFamilyId)
+
+ String subscriberInfo = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.subscriberInfo")
+ execution.setVariable("subscriberInfo", subscriberInfo)
+ msoLogger.debug("Incoming subscriberInfo is: " + subscriberInfo)
+
+ // extract cloud configuration, split vid_ID into cloudOwner and cloudRegionId
+ String vimId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ def cloudRegion = vimId.split("_")
+ def cloudOwner = cloudRegion[0].toString()
+ def cloudRegionId = cloudRegion[1].toString()
+ execution.setVariable("cloudOwner", cloudOwner)
+ utils.log("DEBUG","cloudOwner: " + cloudOwner, isDebugEnabled)
+ execution.setVariable("cloudRegionId", cloudRegionId)
+ utils.log("DEBUG","cloudRegionId: " + cloudRegionId, isDebugEnabled)
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)
+
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+ if (userParams) {
+ userParams.each {
+ userParam ->
+ if ("Customer_Location".equals(userParam?.name)) {
+ execution.setVariable("customerLocation", userParam.value)
+ userParam.value.each {
+ param ->
+ inputMap.put(param.key, param.value)
+ }
+ }
+ if ("Homing_Model_Ids".equals(userParam?.name)) {
+ utils.log("DEBUG", "Homing_Model_Ids: " + userParam.value.toString() + " ---- Type is:" +
+ userParam.value.getClass() , isDebugEnabled)
+ def modelIdLst = []
+ userParam.value.each {
+ param ->
+ def valueMap = [:]
+ param.each {
+ entry ->
+ valueMap.put(entry.key, entry.value)
+ }
+ modelIdLst.add(valueMap)
+ utils.log("DEBUG", "Param: " + param.toString() + " ---- Type is:" +
+ param.getClass() , isDebugEnabled)
+ }
+ execution.setVariable("homingModelIds", modelIdLst)
+ }
+ if ("BRG_WAN_MAC_Address".equals(userParam?.name)) {
+ execution.setVariable("brgWanMacAddress", userParam.value)
+ inputMap.put("BRG_WAN_MAC_Address", userParam.value)
+ }
+ if ("Homing_Solution".equals(userParam?.name)) {
+ execution.setVariable("homingService", userParam.value)
+ inputMap.put("Homing_Solution", userParam.value)
+ }
+ }
+ }
+
+ if (execution.getVariable("homingService") == "") {
+ // Set Default Homing to OOF if not set
+ execution.setVariable("homingService", "oof")
+ }
+
+ msoLogger.debug("User Input Parameters map: " + userParams.toString())
+ execution.setVariable("serviceInputParams", inputMap)
+
+ msoLogger.debug("Incoming brgWanMacAddress is: " + execution.getVariable('brgWanMacAddress'))
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>"""
+
+ execution.setVariable(Prefix + "requestInfo", requestInfo)
+
+ msoLogger.trace("Completed preProcessRequest CreateVcpeResCustService Request ")
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ msoLogger.trace("Inside sendSyncResponse of CreateVcpeResCustService ")
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${
+ requestId
+ }"}}""".trim()
+
+ msoLogger.debug(" sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareDecomposeService(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside prepareDecomposeService of CreateVcpeResCustService ")
+
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+
+ //serviceModelInfo JSON string will be used as-is for DoCreateServiceInstance BB
+ String serviceModelInfo = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ msoLogger.trace("Completed prepareDecomposeService of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside prepareCreateServiceInstance of CreateVcpeResCustService ")
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+// String serviceInputParams = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestParameters")
+// execution.setVariable("serviceInputParams", serviceInputParams)
+
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonStringNoRootName())
+
+ msoLogger.trace("Completed prepareCreateServiceInstance of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void postProcessServiceInstanceCreate(DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' + 'execution=' + execution.getId() + ')'
+ def isDebugLogEnabled = execution.getVariable(DebugFlag)
+ msoLogger.trace('Entered ' + method)
+
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${MsoUtils.xmlEscape(requestId)}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <serviceInstanceName>${MsoUtils.xmlEscape(serviceInstanceName)}</serviceInstanceName>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable(Prefix + "setUpdateDbInstancePayload", payload)
+ msoLogger.debug(Prefix + "setUpdateDbInstancePayload: " + payload)
+ msoLogger.trace('Exited ' + method)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+
+ public void processDecomposition(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ msoLogger.trace("Inside processDecomposition() of CreateVcpeResCustService ")
+
+ try {
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ // VNFs
+ List<VnfResource> vnfList = serviceDecomposition.getVnfResources()
+ filterVnfs(vnfList)
+ serviceDecomposition.setVnfResources(vnfList)
+
+ execution.setVariable("vnfList", vnfList)
+ execution.setVariable("vnfListString", vnfList.toString())
+
+ String vnfModelInfoString = ""
+ if (vnfList != null && vnfList.size() > 0) {
+ execution.setVariable(Prefix + "VNFsCount", vnfList.size())
+ msoLogger.debug("vnfs to create: " + vnfList.size())
+ ModelInfo vnfModelInfo = vnfList[0].getModelInfo()
+
+ vnfModelInfoString = vnfModelInfo.toString()
+ String vnfModelInfoWithRoot = vnfModelInfo.toString()
+ vnfModelInfoString = jsonUtil.getJsonValue(vnfModelInfoWithRoot, "modelInfo")
+ } else {
+ execution.setVariable(Prefix + "VNFsCount", 0)
+ msoLogger.debug("no vnfs to create based upon serviceDecomposition content")
+ }
+
+ execution.setVariable("vnfModelInfo", vnfModelInfoString)
+ execution.setVariable("vnfModelInfoString", vnfModelInfoString)
+ msoLogger.debug(" vnfModelInfoString :" + vnfModelInfoString)
+
+ msoLogger.trace("Completed processDecomposition() of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. processDecomposition() - " + ex.getMessage()
+ msoLogger.debug(exceptionMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ private void filterVnfs(List<VnfResource> vnfList) {
+ if (vnfList == null) {
+ return
+ }
+
+ // remove BRG & TXC from VNF list
+
+ Iterator<VnfResource> it = vnfList.iterator()
+ while (it.hasNext()) {
+ VnfResource vr = it.next()
+
+ String role = vr.getNfRole()
+ if (role == "BRG" || role == "TunnelXConn" || role == "Tunnel XConn") {
+ it.remove()
+ }
+ }
+ }
+
+
+ public void prepareCreateAllottedResourceTXC(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside prepareCreateAllottedResourceTXC of CreateVcpeResCustService ")
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ //allottedResourceModelInfo
+ //allottedResourceRole
+ //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
+ //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this BB will query the full model from the Catalog DB.
+ List<AllottedResource> allottedResources = serviceDecomposition.getAllottedResources()
+ if (allottedResources != null) {
+ Iterator iter = allottedResources.iterator();
+ while (iter.hasNext()) {
+ AllottedResource allottedResource = (AllottedResource) iter.next();
+
+ msoLogger.debug(" getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName())
+ msoLogger.debug(" allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType())
+ if ("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType()) || "Tunnel XConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())) {
+ //set create flag to true
+ execution.setVariable("createTXCAR", true)
+ ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
+ execution.setVariable("allottedResourceModelInfoTXC", allottedResourceModelInfo.toJsonStringNoRootName())
+ execution.setVariable("allottedResourceRoleTXC", allottedResource.getAllottedResourceRole())
+ execution.setVariable("allottedResourceTypeTXC", allottedResource.getAllottedResourceType())
+ //After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the TXC,
+ //and in its homingSolution section should be found the infraServiceInstanceId (i.e. infraServiceInstanceId in TXC Allotted Resource structure) (which the Homing BB would have populated).
+ execution.setVariable("parentServiceInstanceIdTXC", allottedResource.getHomingSolution().getServiceInstanceId())
+ }
+ }
+ }
+
+ //unit test only
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ execution.setVariable("allottedResourceIdTXC", allottedResourceId)
+ msoLogger.debug("setting allottedResourceId CreateVcpeResCustService " + allottedResourceId)
+
+ msoLogger.trace("Completed prepareCreateAllottedResourceTXC of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceTXC flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareCreateAllottedResourceBRG(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside prepareCreateAllottedResourceBRG of CreateVcpeResCustService ")
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ //allottedResourceModelInfo
+ //allottedResourceRole
+ //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
+ //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this BB will query the full model from the Catalog DB.
+ List<AllottedResource> allottedResources = serviceDecomposition.getAllottedResources()
+ if (allottedResources != null) {
+ Iterator iter = allottedResources.iterator();
+ while (iter.hasNext()) {
+ AllottedResource allottedResource = (AllottedResource) iter.next();
+
+ msoLogger.debug(" getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName())
+ msoLogger.debug(" allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType())
+ if ("BRG".equalsIgnoreCase(allottedResource.getAllottedResourceType())) {
+ //set create flag to true
+ execution.setVariable("createBRGAR", true)
+ ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
+ execution.setVariable("allottedResourceModelInfoBRG", allottedResourceModelInfo.toJsonStringNoRootName())
+ execution.setVariable("allottedResourceRoleBRG", allottedResource.getAllottedResourceRole())
+ execution.setVariable("allottedResourceTypeBRG", allottedResource.getAllottedResourceType())
+ //After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the BRG,
+ //and in its homingSolution section should be found the infraServiceInstanceId (i.e. infraServiceInstanceId in BRG Allotted Resource structure) (which the Homing BB would have populated).
+ execution.setVariable("parentServiceInstanceIdBRG", allottedResource.getHomingSolution().getServiceInstanceId())
+ }
+ }
+ }
+
+ //unit test only
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ execution.setVariable("allottedResourceIdBRG", allottedResourceId)
+ msoLogger.debug("setting allottedResourceId CreateVcpeResCustService " + allottedResourceId)
+
+ msoLogger.trace("Completed prepareCreateAllottedResourceBRG of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceBRG flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareVnfAndModulesCreate(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside prepareVnfAndModulesCreate of CreateVcpeResCustService ")
+
+ // String disableRollback = execution.getVariable("disableRollback")
+ // def backoutOnFailure = ""
+ // if(disableRollback != null){
+ // if ( disableRollback == true) {
+ // backoutOnFailure = "false"
+ // } else if ( disableRollback == false) {
+ // backoutOnFailure = "true"
+ // }
+ // }
+ //failIfExists - optional
+
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ msoLogger.debug("productFamilyId: " + productFamilyId)
+
+ List<VnfResource> vnfList = execution.getVariable("vnfList")
+
+ Integer vnfsCreatedCount = execution.getVariable(Prefix + "VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnfList != null && vnfList.size() > 0) {
+ msoLogger.debug("getting model info for vnf # " + vnfsCreatedCount)
+ ModelInfo vnfModelInfo1 = vnfList[0].getModelInfo()
+ msoLogger.debug("got 0 ")
+ ModelInfo vnfModelInfo = vnfList[vnfsCreatedCount.intValue()].getModelInfo()
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ //TODO: vnfList does not contain data. Need to investigate why ... . Fro VCPE use model stored
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ msoLogger.debug(" vnfModelInfoString :" + vnfModelInfoString)
+
+ // extract cloud configuration
+ String vimId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ def cloudRegion = vimId.split("_")
+ execution.setVariable("cloudOwner", cloudRegion[0])
+ msoLogger.debug("cloudOwner: "+ cloudRegion[0])
+ execution.setVariable("cloudRegionId", cloudRegion[1])
+ msoLogger.debug("cloudRegionId: "+ cloudRegion[1])
+ execution.setVariable("lcpCloudRegionId", cloudRegion[1])
+ msoLogger.debug("lcpCloudRegionId: "+ cloudRegion[1])
+ String tenantId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ msoLogger.debug("tenantId: " + tenantId)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ msoLogger.debug("sdncVersion: " + sdncVersion)
+
+ msoLogger.trace("Completed prepareVnfAndModulesCreate of CreateVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ try {
+ msoLogger.trace("Inside validateVnfCreate of CreateVcpeResCustService ")
+
+ Integer vnfsCreatedCount = execution.getVariable(Prefix + "VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable(Prefix + "VnfsCreatedCount", vnfsCreatedCount)
+
+ msoLogger.debug(" ***** Completed validateVnfCreate of CreateVcpeResCustService ***** " + " vnf # " + vnfsCreatedCount)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ msoLogger.trace("Inside postProcessResponse of CreateVcpeResCustService ")
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>CREATE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <status-message>Service Instance has been created successfully via macro orchestration</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>BPMN macro create</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ msoLogger.debug(xmlMsoCompletionRequest)
+ execution.setVariable(Prefix + "Success", true)
+ execution.setVariable(Prefix + "CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void preProcessRollback(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+ msoLogger.trace("preProcessRollback of CreateVcpeResCustService ")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch (Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit preProcessRollback of CreateVcpeResCustService ")
+ }
+
+ public void postProcessRollback(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+ msoLogger.trace("postProcessRollback of CreateVcpeResCustService ")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch (Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("Exit postProcessRollback of CreateVcpeResCustService ")
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+
+ msoLogger.trace("STARTED CreateVcpeResCustService prepareFalloutRequest Process ")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Incoming Workflow Exception: " + wfex.toString())
+ String requestInfo = execution.getVariable(Prefix + "requestInfo")
+ msoLogger.debug(" Incoming Request Info: " + requestInfo)
+
+ //TODO. hmmm. there is no way to UPDATE error message.
+// String errorMessage = wfex.getErrorMessage()
+// boolean successIndicator = execution.getVariable("DCRESI_rolledBack")
+// if (successIndicator){
+// errorMessage = errorMessage + ". Rollback successful."
+// } else {
+// errorMessage = errorMessage + ". Rollback not completed."
+// }
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable(Prefix + "falloutRequest", falloutRequest)
+
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in CreateVcpeResCustService prepareFalloutRequest Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVcpeResCustService prepareFalloutRequest Process")
+ }
+ msoLogger.trace("COMPLETED CreateVcpeResCustService prepareFalloutRequest Process ")
+ }
+
+
+ public void sendSyncError(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+ execution.setVariable("prefix", Prefix)
+
+ msoLogger.trace("Inside sendSyncError() of CreateVcpeResCustService ")
+
+ try {
+ String errorMessage = ""
+ def wfe = execution.getVariable("WorkflowException")
+ if (wfe instanceof WorkflowException) {
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+ }
+
+ public void processJavaException(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable(DebugFlag)
+ execution.setVariable("prefix", Prefix)
+ try {
+ msoLogger.debug("Caught a Java Exception")
+ msoLogger.debug("Started processJavaException Method")
+ msoLogger.debug("Variables List: " + execution.getVariables())
+ execution.setVariable(Prefix + "unexpectedError", "Caught a Java Lang Exception")
+ // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ } catch (BpmnError b) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ throw b
+ } catch (Exception e) {
+ msoLogger.debug("Caught Exception during processJavaException Method: " + e)
+ execution.setVariable(Prefix + "unexpectedError", "Exception in processJavaException method")
+ // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.debug("Completed processJavaException Method")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
new file mode 100644
index 0000000000..eaf3631441
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
@@ -0,0 +1,461 @@
+/*
+ * ============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.vcpe.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.CatalogDbUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.NetworkUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+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.MessageEnum
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+
+/**
+ * This groovy class supports the <class>DeleteVcpeResCustService.bpmn</class> process.
+ *
+ * @author dm4252
+ *
+ */
+public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteVcpeResCustService.class);
+
+ private static final String DebugFlag = "isDebugLogEnabled"
+
+ String Prefix = "DVRCS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+ NetworkUtils networkUtils = new NetworkUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVcpeResCustService.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(DelegateExecution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("DeleteVcpeResCustServiceRequest", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable(Prefix+"vnfsDeletedCount", 0)
+ execution.setVariable(Prefix+"vnfsCount", 0)
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ execution.setVariable("prefix",Prefix)
+
+ msoLogger.trace("Inside preProcessRequest DeleteVcpeResCustService Request ")
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String DeleteVcpeResCustServiceRequest = execution.getVariable("bpmnRequest")
+ msoLogger.debug(DeleteVcpeResCustServiceRequest)
+ execution.setVariable("DeleteVcpeResCustServiceRequest", DeleteVcpeResCustServiceRequest);
+ println 'DeleteVcpeResCustServiceRequest - ' + DeleteVcpeResCustServiceRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ source = "VID"
+ }
+ execution.setVariable("source", source)
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // global-customer-id is optional on Delete
+
+ 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)
+ msoLogger.debug("cloudConfiguration: "+ cloudConfiguration)
+ String lcpCloudRegionId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ msoLogger.debug("lcpCloudRegionId: "+ lcpCloudRegionId)
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("tenantId", tenantId)
+ msoLogger.debug("tenantId: "+ tenantId)
+
+ 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">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </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) {
+ throw e;
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ msoLogger.trace("Inside sendSyncResponse of DeleteVcpeResCustService ")
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ msoLogger.debug(" sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareServiceDelete(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ msoLogger.trace("Inside prepareServiceDelete() of DeleteVcpeResCustService ")
+
+ 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)
+ }
+
+ 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
+ }
+ }
+ }
+
+ 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){
+ 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)
+ }
+
+ 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)
+ msoLogger.trace("Inside prepareVnfAndModulesDelete of DeleteVcpeResCustService ")
+
+ try {
+ List vnfList = execution.getVariable(Prefix+"relatedVnfIdList")
+ int vnfsDeletedCount = execution.getVariable(Prefix+"vnfsDeletedCount")
+ String vnfModelInfoString = ""
+ String vnfId = ""
+ if (vnfList.size() > 0 ) {
+ vnfId = vnfList.get(vnfsDeletedCount.intValue())
+ }
+
+ execution.setVariable("vnfId", vnfId)
+ msoLogger.debug("need to delete vnfId:" + vnfId)
+
+ msoLogger.trace("Completed prepareVnfAndModulesDelete of DeleteVcpeResCustService ")
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Unexpected Error from method prepareVnfAndModulesDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfDelete (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ msoLogger.trace("Inside validateVnfDelete of DeleteVcpeResCustService ")
+
+ 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
+ String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Unexpected Error from method validateVnfDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ msoLogger.trace("Inside postProcessResponse of DeleteVcpeResCustService ")
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <action>DELETE</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ </request-info>
+ <aetgt:status-message>vCPE Res Cust Service Instance has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Service Instance macro action: DELETE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ msoLogger.debug(xmlMsoCompletionRequest)
+ execution.setVariable(Prefix+"Success", true)
+ execution.setVariable(Prefix+"CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ msoLogger.debug(" SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest)
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareFalloutRequest(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ msoLogger.trace("STARTED DeleteVcpeResCustService prepareFalloutRequest Process ")
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ msoLogger.debug(" Incoming Workflow Exception: " + wfex.toString())
+ String requestInfo = execution.getVariable(Prefix+"requestInfo")
+ msoLogger.debug(" Incoming Request Info: " + requestInfo)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable(Prefix+"falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ msoLogger.debug("Error Occured in DeleteVcpeResCustService prepareFalloutRequest Process " + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVcpeResCustService prepareFalloutRequest Process")
+ }
+ msoLogger.trace("COMPLETED DeleteVcpeResCustService prepareFalloutRequest Process ")
+ }
+
+
+ public void sendSyncError (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ msoLogger.trace("Inside sendSyncError() of DeleteVcpeResCustService ")
+
+ try {
+ String errorMessage = ""
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ msoLogger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+ }
+
+ public void processJavaException(DelegateExecution execution){
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ execution.setVariable("prefix",Prefix)
+ try{
+ msoLogger.debug("Caught a Java Exception")
+ msoLogger.debug("Started processJavaException Method")
+ msoLogger.debug("Variables List: " + execution.getVariables())
+ execution.setVariable(Prefix+"unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
+ throw b
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processJavaException Method: " + e)
+ execution.setVariable(Prefix+"unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ msoLogger.debug("Completed processJavaException Method")
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
new file mode 100644
index 0000000000..8a8aa2b2ad
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -0,0 +1,678 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoCreateAllottedResourceBRG.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDEbugLogEnabled
+ * @param - disableRollback
+ * @param - failExists - O
+ * @param - serviceInstanceId
+ * @param - globalCustomerId - O
+ * @param - subscriptionServiceType - O
+ * @param - parentServiceInstanceId
+ * @param - allottedReourceId - O
+ * @param - allottedResourceModelInfo
+ * @param - allottedResourceRole
+ * @param - allottedResourceType
+ * @param - brgWanMacAddress
+ * @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
+ *
+ */
+public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateAllottedResourceBRG.class);
+
+ String Prefix="DCARBRG_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+
+ try {
+ execution.setVariable("prefix", Prefix)
+
+ //Config Inputs
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "mso.workflow.sdncadapter.callback is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ String sdncReplDelay = UrnPropertiesReader.getVariable("mso.workflow.sdnc.replication.delay",execution)
+ if (isBlank(sdncReplDelay)) {
+ msg = "mso.workflow.sdnc.replication.delay is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncReplDelay", sdncReplDelay)
+ msoLogger.debug("SDNC replication delay: " + sdncReplDelay)
+
+ //Request Inputs
+ if (isBlank(execution.getVariable("serviceInstanceId"))){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("parentServiceInstanceId"))) {
+ msg = "Input parentServiceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceModelInfo"))) {
+ msg = "Input allottedResourceModelInfo is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("vni"))) {
+ msg = "Input vni is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("vgmuxBearerIP"))) {
+ msg = "Input vgmuxBearerIP is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("brgWanMacAddress"))) {
+ msg = "Input brgWanMacAddress is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceRole"))) {
+ msg = "Input allottedResourceRole is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceType"))) {
+ msg = "Input allottedResourceType is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ public void getAaiAR (DelegateExecution execution) {
+
+
+ msoLogger.trace("start getAaiAR")
+
+ String arType = execution.getVariable("allottedResourceType")
+ String arRole = execution.getVariable("allottedResourceRole")
+
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String orchStatus = arUtils.getAROrchStatus(execution)
+
+ String errorMsg = ""
+
+ if (orchStatus != null) // AR was found
+ {
+ if ("true".equals(execution.getVariable("failExists")))
+ {
+ errorMsg = "Allotted resource " + arType + " with Role " + arRole + " already exists"
+ }
+ else
+ {
+ if ("Active".equals(orchStatus))
+ {
+ execution.setVariable("foundActiveAR", true)
+ }
+ else // blanks included
+ {
+ errorMsg = "Allotted Resource " + arType + " with Role " + arRole + " already exists in an incomplete state -" + orchStatus
+ }
+ }
+ }
+ if (!isBlank(errorMsg)) {
+ msoLogger.debug(errorMsg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, errorMsg)
+ }
+ msoLogger.trace("end getAaiAR")
+ }
+
+ public void createAaiAR(DelegateExecution execution) {
+
+
+ msoLogger.trace("start createAaiAR")
+ String msg = ""
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ if (isBlank(allottedResourceId))
+ {
+ allottedResourceId = UUID.randomUUID().toString()
+ execution.setVariable("allottedResourceId", allottedResourceId)
+ }
+ String arUrl = ""
+ try {
+
+ //AAI PUT
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aaiEndpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ String siResourceLink= execution.getVariable("PSI_resourceLink")
+
+ String siUri = ""
+ msoLogger.debug("PSI_resourceLink:" + siResourceLink)
+
+ if(!isBlank(siResourceLink)) {
+ msoLogger.debug("Incoming PSI Resource Link is: " + siResourceLink)
+ String[] split = siResourceLink.split("/aai/")
+ siUri = "/aai/" + split[1]
+ }
+ else
+ {
+ msg = "Parent Service Link in AAI is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ arUrl = "${aaiEndpoint}${siUri}" + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
+ execution.setVariable("aaiARPath", arUrl)
+ msoLogger.debug("GET AllottedResource AAI URL is:\n" + arUrl)
+
+ String namespace = aaiUriUtil.getNamespaceFromUri(execution, arUrl)
+
+ String arType = execution.getVariable("allottedResourceType")
+ String arRole = execution.getVariable("allottedResourceRole")
+ String CSI_resourceLink = execution.getVariable("CSI_resourceLink")
+ String arModelInfo = execution.getVariable("allottedResourceModelInfo")
+ String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
+ String modelVersionId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
+ String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+
+ String payload =
+ """<allotted-resource xmlns="${namespace}">
+ <id>${MsoUtils.xmlEscape(allottedResourceId)}</id>
+ <description></description>
+ <type>${MsoUtils.xmlEscape(arType)}</type>
+ <role>${MsoUtils.xmlEscape(arRole)}</role>
+ <selflink></selflink>
+ <model-invariant-id>${MsoUtils.xmlEscape(modelInvariantId)}</model-invariant-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelVersionId)}</model-version-id>
+ <model-customization-id>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-id>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <operation-status></operation-status>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>${MsoUtils.xmlEscape(CSI_resourceLink)}</related-link>
+ </relationship>
+ </relationship-list>
+ </allotted-resource>""".trim()
+
+ execution.setVariable("AaiARPayload", payload)
+ msoLogger.debug(" payload to create AllottedResource in AAI:" + "\n" + payload)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, arUrl, payload)
+ int responseCode = response.getStatusCode()
+ msoLogger.debug("AllottedResource AAI PUT responseCode:" + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ msoLogger.debug("AllottedResource AAI PUT responseStr:" + aaiResponse)
+
+ //200 OK 201 CREATED 202 ACCEPTED
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ {
+ msoLogger.debug("AAI PUT AllottedResource received a Good Response")
+ }
+ else{
+ msoLogger.debug("AAI Put AllottedResouce received a Bad Response Code: " + responseCode)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex) {
+ msg = "Exception in createAaiAR " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put(Prefix, "disableRollback", disableRollback.toString())
+ rollbackData.put(Prefix, "rollbackAAI", "true")
+ rollbackData.put(Prefix, "allottedResourceId", allottedResourceId)
+ rollbackData.put(Prefix, "serviceInstanceId", execution.getVariable("serviceInstanceId"))
+ rollbackData.put(Prefix, "parentServiceInstanceId", execution.getVariable("parentServiceInstanceId"))
+ rollbackData.put(Prefix, "aaiARPath", arUrl)
+ execution.setVariable("rollbackData", rollbackData)
+ msoLogger.trace("end createAaiAR")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
+
+
+ String msg = ""
+ msoLogger.trace("start buildSDNCRequest")
+ String sdncReq = null
+
+ try {
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String globalCustomerId = execution.getVariable("globalCustomerId")
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
+ String callbackUrl = execution.getVariable("sdncCallbackUrl")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String brgWanMacAddress = execution.getVariable("brgWanMacAddress")
+ String vni = execution.getVariable("vni")
+ String vgmuxBearerIP = execution.getVariable("vgmuxBearerIP")
+
+ String arModelInfo = execution.getVariable("allottedResourceModelInfo")
+ String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
+ String modelVersion = jsonUtil.getJsonValue(arModelInfo, "modelVersion")
+ String modelUUId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
+ String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")
+ String modelName = jsonUtil.getJsonValue(arModelInfo, "modelName")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+
+ sdncReq =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>CreateBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <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-type>brg</allotted-resource-type>
+ <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>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <brg-wan-mac-address>${MsoUtils.xmlEscape(brgWanMacAddress)}</brg-wan-mac-address>
+ <vni>${MsoUtils.xmlEscape(vni)}</vni>
+ <vgmux-bearer-ip>${MsoUtils.xmlEscape(vgmuxBearerIP)}</vgmux-bearer-ip>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest:\n" + sdncReq)
+ sdncReq = utils.formatXml(sdncReq)
+
+ } catch(Exception ex) {
+ msg = "Exception in buildSDNCRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end buildSDNCRequest")
+ return sdncReq
+ }
+
+ public void preProcessSDNCAssign(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCAssign")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncAssignReq = buildSDNCRequest(execution, "assign", sdncRequestId)
+ execution.setVariable("sdncAssignRequest", sdncAssignReq)
+ msoLogger.debug("sdncAssignRequest: " + sdncAssignReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncAssignRollbackReq = sdncAssignReq.replace(">assign<", ">unassign<").replace(">CreateBRGInstance<", ">DeleteBRGInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncAssignRollbackReq", sdncAssignRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncAssignRollbackReq:\n" + sdncAssignRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCAssign. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCAssign")
+ }
+
+ public void preProcessSDNCCreate(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCCreate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncCreateReq = buildSDNCRequest(execution, "create", sdncRequestId)
+ execution.setVariable("sdncCreateRequest", sdncCreateReq)
+ msoLogger.debug("sdncCreateReq: " + sdncCreateReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncCreateRollbackReq = sdncCreateReq.replace(">create<", ">delete<").replace(">CreateBRGInstance<", ">DeleteBRGInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncCreateRollbackReq", sdncCreateRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncCreateRollbackReq:\n" + sdncCreateRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCCreate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCCreate")
+ }
+
+ public void preProcessSDNCActivate(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCActivate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncActivateReq = buildSDNCRequest(execution, "activate", sdncRequestId)
+ execution.setVariable("sdncActivateRequest", sdncActivateReq)
+ msoLogger.debug("sdncActivateReq: " + sdncActivateReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncActivateRollbackReq = sdncActivateReq.replace(">activate<", ">deactivate<").replace(">CreateBRGInstance<", ">DeleteBRGInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncActivateRollbackReq", sdncActivateRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncActivateRollbackReq:\n" + sdncActivateRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCActivate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCActivate")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+
+ msoLogger.trace("ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ if (!"get".equals(method))
+ {
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "rollback" + "SDNC" + method, "true")
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("End ValidateSDNCResp Process")
+ }
+
+ public void preProcessSDNCGet(DelegateExecution execution){
+
+ msoLogger.trace("start preProcessSDNCGet")
+ try{
+
+ def callbackUrl = execution.getVariable("sdncCallbackUrl")
+ // serviceOperation (URI for topology GET) will be retrieved from "selflink" from AAI if active AR exists in AAI
+ // or from "object-path" in SDNC response for assign when AR does not exist in AA
+
+ String serviceOperation = ""
+
+ if (execution.getVariable("foundActiveAR")) {
+ def aaiQueryResponse = execution.getVariable("aaiARGetResponse")
+ serviceOperation = utils.getNodeText(aaiQueryResponse, "selflink")
+ msoLogger.debug("AR service operation/aaiARSelfLink: " + serviceOperation)
+ }
+ else
+ {
+ String response = execution.getVariable("sdncAssignResponse")
+ String data = utils.getNodeXml(response, "response-data")
+ msoLogger.debug("Assign responseData: " + data)
+ serviceOperation = utils.getNodeText(data, "object-path")
+ msoLogger.debug("AR service operation:" + serviceOperation)
+ }
+
+ 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"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>vfmodule</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ execution.setVariable("sdncGetRequest", SDNCGetRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("end preProcessSDNCGet")
+ }
+
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+
+ msoLogger.trace("start updateAaiAROrchStatus")
+ String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR) or create
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public void generateOutputs(DelegateExecution execution)
+ {
+
+ msoLogger.trace("start generateOutputs")
+ try {
+ String sdncGetResponse = execution.getVariable("enhancedCallbackRequestData") //unescaped
+ 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"))
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error in generateOutputs ")
+ } catch(Exception ex) {
+ String msg = "Exception in generateOutputs " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end generateOutputs")
+
+ }
+
+ public void preProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("start preProcessRollback")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end preProcessRollback")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("start postProcessRollback")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end postProcessRollback")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
new file mode 100644
index 0000000000..4d4f11c3e5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
@@ -0,0 +1,279 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>CreateAllottedResourceBRGRollback.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDebugLogEnabled
+ * @param - disableRollback - O
+ * @param - rollbackData
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoCreateAllottedResourceBRGRollback extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateAllottedResourceBRGRollback.class);
+
+ String Prefix="DCARBRGRB_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+ execution.setVariable("prefix", Prefix)
+ String rbType = "DCARBRG_"
+ try {
+
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType(rbType)) {
+
+ execution.setVariable("serviceInstanceId", rollbackData.get(rbType, "serviceInstanceId"))
+ execution.setVariable("parentServiceInstanceId", rollbackData.get(rbType, "parentServiceInstanceId"))
+ execution.setVariable("allottedResourceId", rollbackData.get("SERVICEINSTANCE", "allottedResourceId"))
+
+
+ def rollbackAAI = rollbackData.get(rbType, "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ execution.setVariable("aaiARPath", rollbackData.get(rbType, "aaiARPath"))
+
+ }
+ def rollbackSDNC = rollbackData.get(rbType, "rollbackSDNCassign")
+ if ("true".equals(rollbackSDNC))
+ {
+ execution.setVariable("rollbackSDNC", true)
+ execution.setVariable("deactivateSdnc", rollbackData.get(rbType, "rollbackSDNCactivate"))
+ execution.setVariable("deleteSdnc", rollbackData.get(rbType, "rollbackSDNCcreate"))
+ execution.setVariable("unassignSdnc", rollbackData.get(rbType, "rollbackSDNCassign"))
+
+ msoLogger.debug("sdncDeactivate:\n" + execution.getVariable("deactivateSdnc") )
+ msoLogger.debug("sdncDelete:\n" + execution.getVariable("deleteSdnc"))
+ msoLogger.debug("sdncUnassign:\n" + execution.getVariable("unassignSdnc"))
+
+ execution.setVariable("sdncDeactivateRequest", rollbackData.get(rbType, "sdncActivateRollbackReq"))
+ execution.setVariable("sdncDeleteRequest", rollbackData.get(rbType, "sdncCreateRollbackReq"))
+ execution.setVariable("sdncUnassignRequest", rollbackData.get(rbType, "sdncAssignRollbackReq"))
+ }
+
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackSDNC") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ // aaiARPath set during query (existing AR)
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+
+ String msg = null;
+ msoLogger.trace("start updateAaiAROrchStatus")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String aaiARPath = execution.getVariable("aaiARPath")
+ msoLogger.debug(" aaiARPath:" + aaiARPath)
+ String ar = null; //need this for getting resourceVersion for delete
+ if (!isBlank(aaiARPath))
+ {
+ ar = arUtils.getARbyLink(execution, aaiARPath, "")
+ }
+ if (isBlank(ar))
+ {
+ msg = "AR not found in AAI at:" + aaiARPath
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+
+ msoLogger.trace("start ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ }else{
+
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ if ("404".contentEquals(e.getErrorCode()))
+ {
+ msg = "SDNC rollback " + method + " returned a 404. Proceding with rollback"
+ msoLogger.debug(msg)
+ }
+ else {
+ throw e;
+ }
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end ValidateSDNCResp Process")
+ }
+
+ public void deleteAaiAR(DelegateExecution execution){
+
+ try{
+ msoLogger.trace("start deleteAaiAR")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = null //need to get resource-version
+ String arLink = execution.getVariable("aaiARPath")
+ if (!isBlank(arLink))
+ {
+ ar = arUtils.getARbyLink(execution, arLink, "")
+ }
+ arUtils.deleteAR(execution, arLink + '?resource-version=' + UriUtils.encode(execution.getVariable("aaiARResourceVersion"),"UTF-8"))
+ } catch (BpmnError e) {
+ throw e;
+ }catch(Exception ex){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
+ }
+ msoLogger.trace("end deleteAaiAR")
+ }
+
+ public void postProcessRequest(DelegateExecution execution) {
+
+ msoLogger.trace("start postProcessRequest")
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ boolean skipRollback = execution.getVariable("skipRollback")
+ if (skipRollback != true)
+ {
+ execution.setVariable("rolledBack", true)
+ msoLogger.debug("rolledBack")
+ }
+ msoLogger.trace("end postProcessRequest")
+
+ } catch (BpmnError e) {
+ msg = "Bpmn Exception in postProcessRequest. "
+ msoLogger.debug(msg)
+ } catch (Exception ex) {
+ msg = "Exception in postProcessRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+
+ }
+
+ public void processRollbackException(DelegateExecution execution){
+
+ msoLogger.trace("start processRollbackException")
+ try{
+ msoLogger.debug("Caught an Exception in DoCreateAllottedResourceRollback")
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ msoLogger.debug("BPMN Error during processRollbackExceptions Method: ")
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processRollbackExceptions Method: " + e.getMessage())
+ }
+
+ msoLogger.trace("end processRollbackException")
+ }
+
+ public void processRollbackJavaException(DelegateExecution execution){
+
+ msoLogger.trace("start processRollbackJavaException")
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ msoLogger.debug("Caught Exception in processRollbackJavaException")
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception in processRollbackJavaException " + e.getMessage())
+ }
+ msoLogger.trace("end processRollbackJavaException")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
new file mode 100644
index 0000000000..5f9b4b8ecd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -0,0 +1,674 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoCreateAllottedResourceTXC.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDEbugLogEnabled
+ * @param - disableRollback
+ * @param - failExists - O
+ * @param - serviceInstanceId
+ * @param - globalCustomerId - O
+ * @param - subscriptionServiceType - O
+ * @param - parentServiceInstanceId
+ * @param - allottedReourceId - O
+ * @param - allottedResourceModelInfo
+ * @param - allottedResourceRole
+ * @param - allottedResourceType
+ * @param - brgWanMacAddress
+ *
+ * Outputs:
+ * @param - rollbackData (localRB->null)
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ * @param - WorkflowException - O
+ * @param - allottedResourceId
+ * @param - allottedResourceName
+ * @param - vni
+ * @param - vgmuxBearerIP
+ * @param - vgmuxLanIP
+ *
+ */
+public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateAllottedResourceTXC.class);
+
+ String Prefix="DCARTXC_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+
+ try {
+ String msoRequestId = execution.getVariable("msoRequestId")
+ msoLogger.debug(" msoRequestId = " + msoRequestId)
+
+ execution.setVariable("prefix", Prefix)
+
+ //Config Inputs
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "mso.workflow.sdncadapter.callback is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ String sdncReplDelay = UrnPropertiesReader.getVariable("mso.workflow.sdnc.replication.delay",execution)
+ if (isBlank(sdncReplDelay)) {
+ msg = "mso.workflow.sdnc.replication.delay is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncReplDelay", sdncReplDelay)
+ msoLogger.debug("SDNC replication delay: " + sdncReplDelay)
+
+ //Request Inputs
+ if (isBlank(execution.getVariable("serviceInstanceId"))){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("parentServiceInstanceId"))) {
+ msg = "Input parentServiceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceModelInfo"))) {
+ msg = "Input allottedResourceModelInfo is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("brgWanMacAddress"))) {
+ msg = "Input brgWanMacAddress is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceRole"))) {
+ msg = "Input allottedResourceRole is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceType"))) {
+ msg = "Input allottedResourceType is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ public void getAaiAR (DelegateExecution execution) {
+
+
+ msoLogger.trace("start getAaiAR")
+
+ String arType = execution.getVariable("allottedResourceType")
+ String arRole = execution.getVariable("allottedResourceRole")
+
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String orchStatus = arUtils.getAROrchStatus(execution)
+
+ String errorMsg = ""
+
+ if (orchStatus != null) // AR was found
+ {
+ if ("true".equals(execution.getVariable("failExists")))
+ {
+ errorMsg = "Allotted resource " + arType + " with Role " + arRole + " already exists"
+ }
+ else
+ {
+ if ("Active".equals(orchStatus))
+ {
+ execution.setVariable("foundActiveAR", true)
+ }
+ else // blanks included
+ {
+ errorMsg = "Allotted Resource " + arType + " with Role " + arRole + " already exists in an incomplete state -" + orchStatus
+ }
+ }
+ }
+ if (!isBlank(errorMsg)) {
+ msoLogger.debug(errorMsg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, errorMsg)
+ }
+ msoLogger.trace("end getAaiAR")
+ }
+
+ public void createAaiAR(DelegateExecution execution) {
+
+
+ msoLogger.trace("start createAaiAR")
+ String msg = ""
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ if (isBlank(allottedResourceId))
+ {
+ allottedResourceId = UUID.randomUUID().toString()
+ execution.setVariable("allottedResourceId", allottedResourceId)
+ }
+ String arUrl = ""
+ try {
+
+ //AAI PUT
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aaiEndpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
+ String siResourceLink= execution.getVariable("PSI_resourceLink")
+
+ String siUri = ""
+ msoLogger.debug("PSI_resourceLink:" + siResourceLink)
+
+ if(!isBlank(siResourceLink)) {
+ msoLogger.debug("Incoming PSI Resource Link is: " + siResourceLink)
+ String[] split = siResourceLink.split("/aai/")
+ siUri = "/aai/" + split[1]
+ }
+ else
+ {
+ msg = "Parent Service Link in AAI is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ arUrl = "${aaiEndpoint}${siUri}" + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
+ execution.setVariable("aaiARPath", arUrl)
+ msoLogger.debug("GET AllottedResource AAI URL is:\n" + arUrl)
+
+ String namespace = aaiUriUtil.getNamespaceFromUri(execution, arUrl)
+
+ String arType = execution.getVariable("allottedResourceType")
+ String arRole = execution.getVariable("allottedResourceRole")
+ String CSI_resourceLink = execution.getVariable("CSI_resourceLink")
+ String arModelInfo = execution.getVariable("allottedResourceModelInfo")
+ msoLogger.debug("arModelInfo is:\n" + arModelInfo)
+ String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
+ String modelVersionId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
+ String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+
+ String payload =
+ """<allotted-resource xmlns="${namespace}">
+ <id>${MsoUtils.xmlEscape(allottedResourceId)}</id>
+ <description></description>
+ <type>${MsoUtils.xmlEscape(arType)}</type>
+ <role>${MsoUtils.xmlEscape(arRole)}</role>
+ <selflink></selflink>
+ <model-invariant-id>${MsoUtils.xmlEscape(modelInvariantId)}</model-invariant-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelVersionId)}</model-version-id>
+ <model-customization-id>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-id>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <operation-status></operation-status>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>${MsoUtils.xmlEscape(CSI_resourceLink)}</related-link>
+ </relationship>
+ </relationship-list>
+ </allotted-resource>""".trim()
+
+ execution.setVariable("AaiARPayload", payload)
+ msoLogger.debug(" payload to create AllottedResource in AAI:" + "\n" + payload)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, arUrl, payload)
+ int responseCode = response.getStatusCode()
+ msoLogger.debug("AllottedResource AAI PUT responseCode:" + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ msoLogger.debug("AllottedResource AAI PUT responseStr:" + aaiResponse)
+
+ //200 OK 201 CREATED 202 ACCEPTED
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ {
+ msoLogger.debug("AAI PUT AllottedResource received a Good Response")
+ }
+ else{
+ msoLogger.debug("AAI Put AllottedResouce received a Bad Response Code: " + responseCode)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex) {
+ msg = "Exception in createAaiAR " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ //start rollback set up
+ RollbackData rollbackData = new RollbackData()
+ def disableRollback = execution.getVariable("disableRollback")
+ rollbackData.put(Prefix, "disableRollback", disableRollback.toString())
+ rollbackData.put(Prefix, "rollbackAAI", "true")
+ rollbackData.put(Prefix, "allottedResourceId", allottedResourceId)
+ rollbackData.put(Prefix, "serviceInstanceId", execution.getVariable("serviceInstanceId"))
+ rollbackData.put(Prefix, "parentServiceInstanceId", execution.getVariable("parentServiceInstanceId"))
+ rollbackData.put(Prefix, "aaiARPath", arUrl)
+ execution.setVariable("rollbackData", rollbackData)
+ msoLogger.trace("end createAaiAR")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
+
+
+ String msg = ""
+ msoLogger.trace("start buildSDNCRequest")
+ String sdncReq = null
+
+ try {
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String globalCustomerId = execution.getVariable("globalCustomerId")
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
+ String serviceChainServiceInstanceId = execution.getVariable("serviceChainServiceInstanceId")
+ String callbackUrl = execution.getVariable("sdncCallbackUrl")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String brgWanMacAddress = execution.getVariable("brgWanMacAddress")
+
+ String arModelInfo = execution.getVariable("allottedResourceModelInfo")
+ String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
+ String modelVersion = jsonUtil.getJsonValue(arModelInfo, "modelVersion")
+ String modelUUId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
+ String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")
+ String modelName = jsonUtil.getJsonValue(arModelInfo, "modelName")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+
+ sdncReq =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>CreateTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <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-type>tunnelxconn</allotted-resource-type>
+ <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>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <brg-wan-mac-address>${MsoUtils.xmlEscape(brgWanMacAddress)}</brg-wan-mac-address>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest:\n" + sdncReq)
+ sdncReq = utils.formatXml(sdncReq)
+
+ } catch(Exception ex) {
+ msg = "Exception in buildSDNCRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end buildSDNCRequest")
+ return sdncReq
+ }
+
+ public void preProcessSDNCAssign(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCAssign")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncAssignReq = buildSDNCRequest(execution, "assign", sdncRequestId)
+ execution.setVariable("sdncAssignRequest", sdncAssignReq)
+ msoLogger.debug("sdncAssignRequest: " + sdncAssignReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncAssignRollbackReq = sdncAssignReq.replace(">assign<", ">unassign<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncAssignRollbackReq", sdncAssignRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncAssignRollbackReq:\n" + sdncAssignRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCAssign. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.debug("end preProcessSDNCAssign")
+ }
+
+ public void preProcessSDNCCreate(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCCreate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncCreateReq = buildSDNCRequest(execution, "create", sdncRequestId)
+ execution.setVariable("sdncCreateRequest", sdncCreateReq)
+ msoLogger.debug("sdncCreateReq: " + sdncCreateReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncCreateRollbackReq = sdncCreateReq.replace(">create<", ">delete<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncCreateRollbackReq", sdncCreateRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncCreateRollbackReq:\n" + sdncCreateRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCCreate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCCreate")
+ }
+
+ public void preProcessSDNCActivate(DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCActivate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncActivateReq = buildSDNCRequest(execution, "activate", sdncRequestId)
+ execution.setVariable("sdncActivateRequest", sdncActivateReq)
+ msoLogger.debug("sdncActivateReq: " + sdncActivateReq)
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncActivateRollbackReq = sdncActivateReq.replace(">activate<", ">deactivate<").replace(">CreateTunnelXConnInstance<", ">DeleteTunnelXConnInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "sdncActivateRollbackReq", sdncActivateRollbackReq)
+ execution.setVariable("rollbackData", rollbackData)
+
+ msoLogger.debug("sdncActivateRollbackReq:\n" + sdncActivateRollbackReq)
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCActivate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCActivate")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+
+ msoLogger.trace("start ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ if (!"get".equals(method))
+ {
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put(Prefix, "rollback" + "SDNC" + method, "true")
+ execution.setVariable("rollbackData", rollbackData)
+ }
+
+ }else{
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end ValidateSDNCResp Process")
+ }
+
+ public void preProcessSDNCGet(DelegateExecution execution){
+
+ msoLogger.trace("start preProcessSDNCGet")
+ try{
+
+ def callbackUrl = execution.getVariable("sdncCallbackUrl")
+ // serviceOperation (URI for topology GET) will be retrieved from "selflink" from AAI if active AR exists in AAI
+ // or from "object-path" in SDNC response for assign when AR does not exist in AA
+
+ String serviceOperation = ""
+
+ if (execution.getVariable("foundActiveAR")) {
+ def aaiQueryResponse = execution.getVariable("aaiARGetResponse")
+ serviceOperation = utils.getNodeText(aaiQueryResponse, "selflink")
+ msoLogger.debug("AR service operation/aaiARSelfLink: " + serviceOperation)
+ }
+ else
+ {
+ String response = execution.getVariable("sdncAssignResponse")
+ String data = utils.getNodeXml(response, "response-data")
+ msoLogger.debug("Assign responseData: " + data)
+ serviceOperation = utils.getNodeText(data, "object-path")
+ msoLogger.debug("AR service operation:" + serviceOperation)
+ }
+
+ 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"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${MsoUtils.xmlEscape(serviceOperation)}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>vfmodule</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ execution.setVariable("sdncGetRequest", SDNCGetRequest)
+
+ }catch(Exception e){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + e.getMessage())
+ }
+ msoLogger.trace("end preProcessSDNCGet")
+ }
+
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+
+ msoLogger.trace("start updateAaiAROrchStatus")
+ String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR) or create
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public void generateOutputs(DelegateExecution execution)
+ {
+
+ msoLogger.trace("start generateOutputs")
+ try {
+ String sdncGetResponse = execution.getVariable("enhancedCallbackRequestData") //unescaped
+ msoLogger.debug("resp:" + sdncGetResponse)
+ String arData = utils.getNodeXml(sdncGetResponse, "tunnelxconn-topology")
+ arData = utils.removeXmlNamespaces(arData)
+
+ String txca = utils.getNodeXml(arData, "tunnelxconn-assignments")
+ execution.setVariable("vni", utils.getNodeText(txca, "vni"))
+ execution.setVariable("vgmuxBearerIP", utils.getNodeText(txca, "vgmux-bearer-ip"))
+ execution.setVariable("vgmuxLanIP", utils.getNodeText(txca, "vgmux-lan-ip"))
+
+ String ari = utils.getNodeXml(arData, "allotted-resource-identifiers")
+ execution.setVariable("allotedResourceName", utils.getNodeText(ari, "allotted-resource-name"))
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error in generateOutputs ")
+ } catch(Exception ex) {
+ String msg = "Exception in generateOutputs " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end generateOutputs")
+
+ }
+
+ public void preProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("start preProcessRollback")
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ msoLogger.debug("BPMN Error during preProcessRollback")
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end preProcessRollback")
+ }
+
+ public void postProcessRollback (DelegateExecution execution) {
+
+ msoLogger.trace("start postProcessRollback")
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ msoLogger.debug("Setting prevException to WorkflowException: ")
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ msoLogger.debug("BPMN Error during postProcessRollback")
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+ msoLogger.trace("end postProcessRollback")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
new file mode 100644
index 0000000000..24b919524f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
@@ -0,0 +1,278 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>CreateAllottedResourceTXCRollback.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDebugLogEnabled
+ * @param - disableRollback - O
+ * @param - rollbackData
+ *
+ * Outputs:
+ * @param - rollbackError
+ * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
+ *
+ */
+public class DoCreateAllottedResourceTXCRollback extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateAllottedResourceTXCRollback.class);
+
+ String Prefix="DCARTXCRB_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+ execution.setVariable("prefix", Prefix)
+ String rbType = "DCARTXC_"
+ try {
+
+ def rollbackData = execution.getVariable("rollbackData")
+ msoLogger.debug("RollbackData:" + rollbackData)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType(rbType)) {
+
+ execution.setVariable("serviceInstanceId", rollbackData.get(rbType, "serviceInstanceId"))
+ execution.setVariable("parentServiceInstanceId", rollbackData.get(rbType, "parentServiceInstanceId"))
+ execution.setVariable("allottedResourceId", rollbackData.get("SERVICEINSTANCE", "allottedResourceId"))
+
+
+ def rollbackAAI = rollbackData.get(rbType, "rollbackAAI")
+ if ("true".equals(rollbackAAI))
+ {
+ execution.setVariable("rollbackAAI",true)
+ execution.setVariable("aaiARPath", rollbackData.get(rbType, "aaiARPath"))
+
+ }
+ def rollbackSDNC = rollbackData.get(rbType, "rollbackSDNCassign")
+ if ("true".equals(rollbackSDNC))
+ {
+ execution.setVariable("rollbackSDNC", true)
+ execution.setVariable("deactivateSdnc", rollbackData.get(rbType, "rollbackSDNCactivate"))
+ execution.setVariable("deleteSdnc", rollbackData.get(rbType, "rollbackSDNCcreate"))
+ execution.setVariable("unassignSdnc", rollbackData.get(rbType, "rollbackSDNCassign"))
+
+ msoLogger.debug("sdncDeactivate:\n" + execution.getVariable("deactivateSdnc") )
+ msoLogger.debug("sdncDelete:\n" + execution.getVariable("deleteSdnc"))
+ msoLogger.debug("sdncUnassign:\n" + execution.getVariable("unassignSdnc"))
+
+ execution.setVariable("sdncDeactivateRequest", rollbackData.get(rbType, "sdncActivateRollbackReq"))
+ execution.setVariable("sdncDeleteRequest", rollbackData.get(rbType, "sdncCreateRollbackReq"))
+ execution.setVariable("sdncUnassignRequest", rollbackData.get(rbType, "sdncAssignRollbackReq"))
+ }
+
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackSDNC") != true)
+ {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ }
+ else {
+ execution.setVariable("skipRollback", true)
+ }
+ if (execution.getVariable("disableRollback").equals("true" ))
+ {
+ execution.setVariable("skipRollback", true)
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ // aaiARPath set during query (existing AR)
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+
+ String msg = null;
+ msoLogger.trace("start updateAaiAROrchStatus")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String aaiARPath = execution.getVariable("aaiARPath")
+ msoLogger.debug(" aaiARPath:" + aaiARPath)
+ String ar = null; //need this for getting resourceVersion for delete
+ if (!isBlank(aaiARPath))
+ {
+ ar = arUtils.getARbyLink(execution, aaiARPath, "")
+ }
+ if (isBlank(ar))
+ {
+ msg = "AR not found in AAI at:" + aaiARPath
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+
+ msoLogger.trace("start ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ }else{
+
+ msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ if ("404".contentEquals(e.getErrorCode()))
+ {
+ msg = "SDNC rollback " + method + " returned a 404. Proceding with rollback"
+ msoLogger.debug(msg)
+ }
+ else {
+ throw e;
+ }
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit ValidateSDNCResp Process")
+ }
+
+ public void deleteAaiAR(DelegateExecution execution){
+
+ try{
+ msoLogger.trace("start deleteAaiAR")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = null //need to get resource-version
+ String arLink = execution.getVariable("aaiARPath")
+ if (!isBlank(arLink))
+ {
+ ar = arUtils.getARbyLink(execution, arLink, "")
+ }
+ arUtils.deleteAR(execution, arLink + '?resource-version=' + UriUtils.encode(execution.getVariable("aaiARResourceVersion"),"UTF-8"))
+ } catch (BpmnError e) {
+ throw e;
+ }catch(Exception ex){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
+ }
+ msoLogger.trace("end deleteAaiAR")
+ }
+
+ public void postProcessRequest(DelegateExecution execution) {
+
+ msoLogger.trace("start postProcessRequest")
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ boolean skipRollback = execution.getVariable("skipRollback")
+ if (skipRollback != true)
+ {
+ execution.setVariable("rolledBack", true)
+ msoLogger.debug("rolledBack")
+ }
+ msoLogger.trace("end postProcessRequest")
+
+ } catch (BpmnError e) {
+ msoLogger.debug(msg)
+ } catch (Exception ex) {
+ msg = "Exception in postProcessRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ }
+
+ }
+
+ public void processRollbackException(DelegateExecution execution){
+
+ msoLogger.trace("start processRollbackException")
+ try{
+ msoLogger.debug("Caught an Exception in DoCreateAllottedResourceRollback")
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ msoLogger.debug("BPMN Error during processRollbackExceptions Method: ")
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception during processRollbackExceptions Method: " + e.getMessage())
+ }
+
+ msoLogger.trace("end processRollbackException")
+ }
+
+ public void processRollbackJavaException(DelegateExecution execution){
+
+ msoLogger.trace("start processRollbackJavaException")
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ msoLogger.debug("Caught Exception in processRollbackJavaException")
+
+ }catch(Exception e){
+ msoLogger.debug("Caught Exception in processRollbackJavaException " + e.getMessage())
+ }
+ msoLogger.trace("end processRollbackJavaException")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
new file mode 100644
index 0000000000..a5125fea73
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
@@ -0,0 +1,368 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoDeleteAllottedResourceBRG.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDebugLogEnabled
+ * @param - disableRollback - O ignored
+ * @param - failNotfound - O
+ * @param - serviceInstanceId
+ * @param - globalCustomerId - O
+ * @param - subscriptionServiceType - O
+ * @param - parentServiceInstanceId
+ * @param - allottedResourceId
+ *
+ * Outputs:
+ * @param - rollbackData - N/A
+ * @param - rolledBack - true if no deletions performed
+ * @param - WorkflowException - O
+ * @param - wasDeleted - O (ie not silentSuccess)
+ *
+ */
+public class DoDeleteAllottedResourceBRG extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteAllottedResourceBRG.class);
+
+ String Prefix="DDARBRG_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+
+ try {
+ execution.setVariable("prefix", Prefix)
+
+ //Config Inputs
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "mso.workflow.sdncadapter.callback is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ //Request Inputs
+ if (isBlank(execution.getVariable("serviceInstanceId"))){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceId"))){
+ msg = "Input allottedResourceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ public void getAaiAR (DelegateExecution execution) {
+
+ msoLogger.trace("start getAaiAR end")
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = arUtils.getARbyId(execution, allottedResourceId)
+
+ String errorMsg = ""
+ if (isBlank(ar)) // AR was !found
+ {
+ errorMsg = "Allotted resource not found in AAI with AllottedResourceId:" + allottedResourceId
+ }
+ else
+ {
+ String aaiARPath = execution.getVariable("aaiARPath")
+ String parentServiceInstanceId = arUtils.getPSIFmARLink(execution, aaiARPath)
+ execution.setVariable("parentServiceInstanceId", parentServiceInstanceId)
+ }
+ if (!isBlank(errorMsg)) {
+ msoLogger.debug(errorMsg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, errorMsg)
+ }
+ msoLogger.trace("end getAaiAR")
+
+ }
+
+ // aaiARPath set during query (existing AR)
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+ msoLogger.trace("start updateAaiAROrchStatus")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR)
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
+
+ String msg = ""
+ msoLogger.trace("start buildSDNCRequest")
+ String sdncReq = null
+
+ try {
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
+ String globalCustomerId = execution.getVariable("globalCustomerId")
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+
+ String callbackUrl = execution.getVariable("sdncCallbackUrl")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String serviceChainServiceInstanceId = ""
+ String sourceNetworkId = ""
+ String sourceNetworkRole = ""
+ String allottedResourceRole = ""
+
+ String arModelInfo = ""
+ String modelInvariantId = ""
+ String modelVersion = ""
+ String modelUUId = ""
+ String modelCustomizationId = ""
+ String modelName = ""
+
+
+ sdncReq =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <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-type>brg</allotted-resource-type>
+ <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>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest:\n" + sdncReq)
+ sdncReq = utils.formatXml(sdncReq)
+
+ } catch(Exception ex) {
+ msg = "Exception in buildSDNCRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end buildSDNCRequest")
+ return sdncReq
+ }
+
+ public void preProcessSDNCUnassign(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCUnassign")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncUnassignReq = buildSDNCRequest(execution, "unassign", sdncRequestId)
+ execution.setVariable("sdncUnassignRequest", sdncUnassignReq)
+ msoLogger.debug("sdncUnassignRequest: " + sdncUnassignReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCUnassign. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCUnassign")
+ }
+
+ public void preProcessSDNCDelete(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCDelete")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncDeleteReq = buildSDNCRequest(execution, "delete", sdncRequestId)
+ execution.setVariable("sdncDeleteRequest", sdncDeleteReq)
+ msoLogger.debug("sdncDeleteReq: " + sdncDeleteReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCDelete")
+ }
+
+ public void preProcessSDNCDeactivate(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCDeactivate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncDeactivateReq = buildSDNCRequest(execution, "deactivate", sdncRequestId)
+ execution.setVariable("sdncDeactivateRequest", sdncDeactivateReq)
+ msoLogger.debug("sdncDeactivateReq: " + sdncDeactivateReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDeactivate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCDeactivate")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+ msoLogger.trace("start ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ }else{
+ String sdncRespCode = execution.getVariable(Prefix + 'sdncRequestDataResponseCode')
+ msoLogger.debug(method + " AllottedResource received error response from SDNC. ResponseCode:" + sdncRespCode)
+ if (sdncRespCode.equals("404") && "deactivate".equals(method))
+ {
+ execution.setVariable("ARNotFoundInSDNC", true)
+ if ("true".equals(execution.getVariable("failNotFound")))
+ {
+ msg = "Allotted Resource Not found in SDNC"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ else
+ {
+ execution.setVariable("wasDeleted", false)
+ }
+ }
+ else
+ {
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end ValidateSDNCResp Process")
+ }
+
+ public void deleteAaiAR(DelegateExecution execution){
+ msoLogger.trace("start deleteAaiAR")
+
+ try{
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = null //need to get resource-version again
+ String arLink = execution.getVariable("aaiARPath")
+ if (!isBlank(arLink))
+ {
+ ar = arUtils.getARbyLink(execution, arLink, "")
+ }
+ arUtils.deleteAR(execution, arLink + '?resource-version=' + UriUtils.encode(execution.getVariable("aaiARResourceVersion"),"UTF-8"))
+ } catch (BpmnError e) {
+ throw e;
+ }catch(Exception ex){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest." + ex, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:" + ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
+ }
+ msoLogger.trace("end deleteAaiAR")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
new file mode 100644
index 0000000000..7ce606e685
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
@@ -0,0 +1,369 @@
+/*
+ * ============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.vcpe.scripts;
+
+import org.onap.so.bpmn.common.scripts.*;
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.rest.APIResponse
+
+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.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+
+import org.onap.so.logger.MessageEnum
+import org.onap.so.logger.MsoLogger
+
+/**
+ * This groovy class supports the <class>DoDeleteAllottedResourceTXC.bpmn</class> process.
+ *
+ * @author
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - isDebugLogEnabled
+ * @param - disableRollback - O ignored
+ * @param - failNotfound - O
+ * @param - serviceInstanceId
+ * @param - globalCustomerId - O
+ * @param - subscriptionServiceType - O
+ * @param - parentServiceInstanceId
+ * @param - allottedResourceId
+ *
+ * Outputs:
+ * @param - rollbackData - N/A
+ * @param - rolledBack - true if no deletions performed
+ * @param - WorkflowException - O
+ * @param - wasDeleted - O (ie not silentSuccess)
+ *
+ */
+public class DoDeleteAllottedResourceTXC extends AbstractServiceTaskProcessor{
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteAllottedResourceTXC.class);
+
+ String Prefix="DDARTXC_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessRequest")
+
+ try {
+ execution.setVariable("prefix", Prefix)
+
+ //Config Inputs
+ String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
+ if (isBlank(sdncCallbackUrl)) {
+ msg = "mso.workflow.sdncadapter.callback is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ msoLogger.debug("SDNC Callback URL: " + sdncCallbackUrl)
+
+ //Request Inputs
+ if (isBlank(execution.getVariable("serviceInstanceId"))){
+ msg = "Input serviceInstanceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(execution.getVariable("allottedResourceId"))){
+ msg = "Input allottedResourceId is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ }catch(BpmnError b){
+ msoLogger.debug("Rethrowing MSOWorkflowException")
+ throw b
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessRequest")
+ }
+
+ public void getAaiAR (DelegateExecution execution) {
+
+ msoLogger.trace("start getAaiAR")
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = arUtils.getARbyId(execution, allottedResourceId)
+
+ String errorMsg = ""
+ if (isBlank(ar)) // AR was !found
+ {
+ errorMsg = "Allotted resource not found in AAI with AllottedResourceId:" + allottedResourceId
+ }
+ else
+ {
+ String aaiARPath = execution.getVariable("aaiARPath")
+ String parentServiceInstanceId = arUtils.getPSIFmARLink(execution, aaiARPath)
+ execution.setVariable("parentServiceInstanceId", parentServiceInstanceId)
+ }
+ if (!isBlank(errorMsg)) {
+ msoLogger.debug(errorMsg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, errorMsg)
+ }
+ msoLogger.trace("end getAaiAR")
+
+ }
+
+ // aaiARPath set during query (existing AR)
+ public void updateAaiAROrchStatus(DelegateExecution execution, String status){
+ msoLogger.trace("start updateAaiAROrchStatus")
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR)
+ String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
+ msoLogger.trace("end updateAaiAROrchStatus")
+ }
+
+ public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
+
+ String msg = ""
+ msoLogger.trace("start buildSDNCRequest")
+ String sdncReq = null
+
+ try {
+
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String parentServiceInstanceId = execution.getVariable("parentServiceInstanceId")
+ String globalCustomerId = execution.getVariable("globalCustomerId")
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+
+ String callbackUrl = execution.getVariable("sdncCallbackUrl")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String serviceChainServiceInstanceId = ""
+ String sourceNetworkId = ""
+ String sourceNetworkRole = ""
+ String allottedResourceRole = ""
+
+ String arModelInfo = ""
+ String modelInvariantId = ""
+ String modelVersion = ""
+ String modelUUId = ""
+ String modelCustomizationId = ""
+ String modelName = ""
+
+
+ sdncReq =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(sdncRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackUrl)}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <subscriber-name/>
+ <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-type>tunnelxconn</allotted-resource-type>
+ <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>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ msoLogger.debug("sdncRequest:\n" + sdncReq)
+ sdncReq = utils.formatXml(sdncReq)
+
+ } catch(Exception ex) {
+ msg = "Exception in buildSDNCRequest. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end buildSDNCRequest")
+ return sdncReq
+ }
+
+ public void preProcessSDNCUnassign(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCUnassign")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncUnassignReq = buildSDNCRequest(execution, "unassign", sdncRequestId)
+ execution.setVariable("sdncUnassignRequest", sdncUnassignReq)
+ msoLogger.debug("sdncUnassignRequest: " + sdncUnassignReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCUnassign. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCUnassign")
+ }
+
+ public void preProcessSDNCDelete(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCDelete")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncDeleteReq = buildSDNCRequest(execution, "delete", sdncRequestId)
+ execution.setVariable("sdncDeleteRequest", sdncDeleteReq)
+ msoLogger.debug("sdncDeleteReq: " + sdncDeleteReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCDelete")
+ }
+
+ public void preProcessSDNCDeactivate(DelegateExecution execution) {
+
+ String msg = ""
+ msoLogger.trace("start preProcessSDNCDeactivate")
+
+ try {
+ String sdncRequestId = UUID.randomUUID().toString()
+ String sdncDeactivateReq = buildSDNCRequest(execution, "deactivate", sdncRequestId)
+ execution.setVariable("sdncDeactivateRequest", sdncDeactivateReq)
+ msoLogger.debug("sdncDeactivateReq: " + sdncDeactivateReq)
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDeactivate. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end preProcessSDNCDeactivate")
+ }
+
+ public void validateSDNCResp(DelegateExecution execution, String response, String method){
+
+ msoLogger.trace("start ValidateSDNCResponse Process")
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ msoLogger.debug("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ msoLogger.debug("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + response)
+
+ }else{
+ String sdncRespCode = execution.getVariable(Prefix + 'sdncRequestDataResponseCode')
+ msoLogger.debug(method + " AllottedResource received error response from SDNC. ResponseCode:" + sdncRespCode)
+ if (sdncRespCode.equals("404") && "deactivate".equals(method))
+ {
+ execution.setVariable("ARNotFoundInSDNC", true)
+ if ("true".equals(execution.getVariable("failNotFound")))
+ {
+ msg = "Allotted Resource Not found in SDNC"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ else
+ {
+ execution.setVariable("wasDeleted", false)
+ }
+ }
+ else
+ {
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in validateSDNCResp. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("end Exit ValidateSDNCResp Process")
+ }
+
+ public void deleteAaiAR(DelegateExecution execution){
+ msoLogger.trace("start deleteAaiAR")
+
+ try{
+ AllottedResourceUtils arUtils = new AllottedResourceUtils(this)
+ String ar = null //need to get resource-version again
+ String arLink = execution.getVariable("aaiARPath")
+ if (!isBlank(arLink))
+ {
+ ar = arUtils.getARbyLink(execution, arLink, "")
+ }
+ arUtils.deleteAR(execution, arLink + '?resource-version=' + UriUtils.encode(execution.getVariable("aaiARResourceVersion"),"UTF-8"))
+ } catch (BpmnError e) {
+ throw e;
+ }catch(Exception ex){
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
+ }
+ msoLogger.trace("end deleteAaiAR")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000000..13a24c8b8b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ 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=========================================================
+ -->
+
+
+<process-application
+ xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <process-archive>
+ <properties>
+ <property name="isDeleteUponUndeploy">false</property>
+ <property name="isScanForProcessDefinitions">true</property>
+ <!-- history cleanup batch job starts at 6:00am UTC time (01:00am Central) -->
+ <property name="historyCleanupBatchWindowStartTime">06:00</property>
+ <property name="historyCleanupBatchWindowEndTime">09:00</property>
+ </properties>
+ </process-archive>
+
+</process-application>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..086171ec98
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
@@ -0,0 +1,335 @@
+<?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="CompareModelofE2EServiceInstance" name="CompareModelofE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_00qj6ro" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:subProcess id="SubProcess_0ka59nc" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0u3lw39" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1dsbjjb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yay321</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_0v1ffn4">
+ <bpmn:outgoing>SequenceFlow_1dsbjjb</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0eznq6x">
+ <bpmn:incoming>SequenceFlow_1yay321</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
+ </bpmn:subProcess>
+ <bpmn:callActivity id="DoCompareModelofE2EServiceInstance" name="Call DoCompareModelofE2EServiceInstance&#10;" calledElement="DoCompareModelofE2EServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="modelInvariantIdTarget" target="modelInvariantIdTarget" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="compareModelsResult" target="compareModelsResult" />
+ <camunda:in source="modelVersionIdTarget" target="modelVersionIdTarget" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="initialStatus" target="initialStatus" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="URN_mso_adapters_openecomp_db_endpoint" target="URN_mso_adapters_openecomp_db_endpoint" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0tm7z1o</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:endEvent id="EndEvent_0bpd6c0" name="End">
+ <bpmn:incoming>SequenceFlow_0yayvrf</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_1s09c7d" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0s2spoq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0tm7z1o</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CompareModelofE2EServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_0vaws86" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0dug28e">
+ <bpmn:outgoing>SequenceFlow_0e1r62n</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_03wysuk">
+ <bpmn:incoming>SequenceFlow_1ysapam</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0u8o9p2" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0n9pexp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01umodj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CompareModelofE2EServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1ang7q8" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_01umodj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ysapam</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="ScriptTask_1rn6nqi" name="Send Error Response">
+ <bpmn:incoming>SequenceFlow_0e1r62n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0n9pexp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CompareModelofE2EServiceInstance()
+csi.sendSyncError(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1r62n" sourceRef="StartEvent_0dug28e" targetRef="ScriptTask_1rn6nqi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ysapam" sourceRef="CallActivity_1ang7q8" targetRef="EndEvent_03wysuk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0n9pexp" sourceRef="ScriptTask_1rn6nqi" targetRef="ScriptTask_0u8o9p2" />
+ <bpmn:sequenceFlow id="SequenceFlow_01umodj" sourceRef="ScriptTask_0u8o9p2" targetRef="CallActivity_1ang7q8" />
+ </bpmn:subProcess>
+ <bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0klbpxx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12jdmq5</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CompareModelofE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0aqn64l" name="Success?">
+ <bpmn:incoming>SequenceFlow_12jdmq5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1fueo69</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0y8s0kd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_07uk5iy">
+ <bpmn:incoming>SequenceFlow_1fueo69</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_0nbdy47" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0s2spoq" sourceRef="StartEvent_00qj6ro" targetRef="ScriptTask_1s09c7d" />
+ <bpmn:sequenceFlow id="SequenceFlow_0klbpxx" sourceRef="DoCompareModelofE2EServiceInstance" targetRef="ScriptTask_0xupxj9" />
+ <bpmn:sequenceFlow id="SequenceFlow_1fueo69" name="no" sourceRef="ExclusiveGateway_0aqn64l" targetRef="EndEvent_07uk5iy">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0tm7z1o" sourceRef="ScriptTask_1s09c7d" targetRef="DoCompareModelofE2EServiceInstance" />
+ <bpmn:callActivity id="CallActivity_02fyxz0" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0a01ez6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yayvrf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0yayvrf" sourceRef="CallActivity_02fyxz0" targetRef="EndEvent_0bpd6c0" />
+ <bpmn:sequenceFlow id="SequenceFlow_12jdmq5" sourceRef="ScriptTask_0xupxj9" targetRef="ExclusiveGateway_0aqn64l" />
+ <bpmn:scriptTask id="ScriptTask_0hkyfdj" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0y8s0kd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0a01ez6</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CompareModelofE2EServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0a01ez6" sourceRef="ScriptTask_0hkyfdj" targetRef="CallActivity_02fyxz0" />
+ <bpmn:sequenceFlow id="SequenceFlow_0y8s0kd" name="yes" sourceRef="ExclusiveGateway_0aqn64l" targetRef="ScriptTask_0hkyfdj">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ </bpmn:process>
+ <bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CompareModelofE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
+ <dc:Bounds x="-6" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-12" y="221" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0ka59nc_di" bpmnElement="SubProcess_0ka59nc" isExpanded="true">
+ <dc:Bounds x="463" y="632" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0rhljy8_di" bpmnElement="DoCompareModelofE2EServiceInstance">
+ <dc:Bounds x="458" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0bpd6c0_di" bpmnElement="EndEvent_0bpd6c0">
+ <dc:Bounds x="1258" y="286" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1268" y="322" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
+ <dc:Bounds x="214" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0vaws86_di" bpmnElement="SubProcess_0vaws86" isExpanded="true">
+ <dc:Bounds x="348" y="370" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xupxj9_di" bpmnElement="ScriptTask_0xupxj9">
+ <dc:Bounds x="683" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0aqn64l_di" bpmnElement="ExclusiveGateway_0aqn64l" isMarkerVisible="true">
+ <dc:Bounds x="903" y="173" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="145" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_07uk5iy_di" bpmnElement="EndEvent_07uk5iy">
+ <dc:Bounds x="910" y="286" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="322" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </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="214" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="77" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
+ <di:waypoint xsi:type="dc:Point" x="558" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fueo69_di" bpmnElement="SequenceFlow_1fueo69">
+ <di:waypoint xsi:type="dc:Point" x="928" y="223" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="250" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="250" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="286" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="901" y="228" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u3lw39_di" bpmnElement="ScriptTask_0u3lw39">
+ <dc:Bounds x="611" y="687" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0v1ffn4_di" bpmnElement="StartEvent_0v1ffn4">
+ <dc:Bounds x="496" y="709" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="469" y="750" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0eznq6x_di" bpmnElement="EndEvent_0eznq6x">
+ <dc:Bounds x="772" y="709" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="745" y="750" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0dug28e_di" bpmnElement="StartEvent_0dug28e">
+ <dc:Bounds x="363" y="456" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="497" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_03wysuk_di" bpmnElement="EndEvent_03wysuk">
+ <dc:Bounds x="942" y="456" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="915" y="497" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0u8o9p2_di" bpmnElement="ScriptTask_0u8o9p2">
+ <dc:Bounds x="621" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ang7q8_di" bpmnElement="CallActivity_1ang7q8">
+ <dc:Bounds x="798" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rn6nqi_di" bpmnElement="ScriptTask_1rn6nqi">
+ <dc:Bounds x="443" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dsbjjb_di" bpmnElement="SequenceFlow_1dsbjjb">
+ <di:waypoint xsi:type="dc:Point" x="532" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="611" y="727" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="529.5" y="727" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yay321_di" bpmnElement="SequenceFlow_1yay321">
+ <di:waypoint xsi:type="dc:Point" x="711" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="727" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701.5" y="727" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1r62n_di" bpmnElement="SequenceFlow_0e1r62n">
+ <di:waypoint xsi:type="dc:Point" x="399" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391" y="474" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ysapam_di" bpmnElement="SequenceFlow_1ysapam">
+ <di:waypoint xsi:type="dc:Point" x="898" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="942" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="875" y="459" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n9pexp_di" bpmnElement="SequenceFlow_0n9pexp">
+ <di:waypoint xsi:type="dc:Point" x="543" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="570" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="570" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="621" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="540" y="474" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01umodj_di" bpmnElement="SequenceFlow_01umodj">
+ <di:waypoint xsi:type="dc:Point" x="721" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="798" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715.5" y="459" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tm7z1o_di" bpmnElement="SequenceFlow_0tm7z1o">
+ <di:waypoint xsi:type="dc:Point" x="314" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="458" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="177" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_02fyxz0_di" bpmnElement="CallActivity_02fyxz0">
+ <dc:Bounds x="1226" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
+ <di:waypoint xsi:type="dc:Point" x="1276" y="238" />
+ <di:waypoint xsi:type="dc:Point" x="1276" y="286" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1201" y="262" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12jdmq5_di" bpmnElement="SequenceFlow_12jdmq5">
+ <di:waypoint xsi:type="dc:Point" x="783" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="903" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="177" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0hkyfdj_di" bpmnElement="ScriptTask_0hkyfdj">
+ <dc:Bounds x="1031" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a01ez6_di" bpmnElement="SequenceFlow_0a01ez6">
+ <di:waypoint xsi:type="dc:Point" x="1131" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1178.5" y="177" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y8s0kd_di" bpmnElement="SequenceFlow_0y8s0kd">
+ <di:waypoint xsi:type="dc:Point" x="953" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="983" y="177" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn
new file mode 100644
index 0000000000..8f2bf67b71
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn
@@ -0,0 +1,325 @@
+<?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.11.3">
+ <bpmn:collaboration id="Collaboration_1d0w8lf">
+ <bpmn:participant id="Participant_1egg397" name="SO&#10;Create and Activate Pnf Resource" processRef="CreateAndActivatePnfResource" />
+ <bpmn:participant id="Participant_0atuyq0" name="AAI" />
+ <bpmn:participant id="Participant_19w87ws" name="Workflow Message Service&#10;(communication with DMAAP)&#10;" />
+ <bpmn:messageFlow id="MessageFlow_1h3xu88" sourceRef="CreateAndActivatePnf_CreateAaiEntry" targetRef="Participant_0atuyq0" />
+ <bpmn:messageFlow id="MessageFlow_09ibv5a" sourceRef="CheckAiiForCorrelationId" targetRef="Participant_0atuyq0" />
+ <bpmn:messageFlow id="MessageFlow_0vjul4t" sourceRef="Participant_0atuyq0" targetRef="CheckAiiForCorrelationId" />
+ <bpmn:messageFlow id="MessageFlow_1vrcp2d" sourceRef="Participant_19w87ws" targetRef="WaitForDmaapPnfReadyNotification" />
+ <bpmn:messageFlow id="MessageFlow_0tg4hw9" sourceRef="InformDmaapClient" targetRef="Participant_19w87ws" />
+ <bpmn:messageFlow id="MessageFlow_1py54jr" sourceRef="CancelDmaapClientSubscription" targetRef="Participant_19w87ws" />
+ </bpmn:collaboration>
+ <bpmn:process id="CreateAndActivatePnfResource" name="CreateAndActivatePnfResource" isExecutable="true">
+ <bpmn:sequenceFlow id="SequenceFlow_1kc34bc" sourceRef="WaitForDmaapTimeout" targetRef="CancelDmaapClientSubscription" />
+ <bpmn:sequenceFlow id="SequenceFlow_1o8od8e" sourceRef="InformDmaapClient" targetRef="WaitForDmaapPnfReadyNotification" />
+ <bpmn:sequenceFlow id="SequenceFlow_0v5ffpe" name="No" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="CreateAndActivatePnf_CreateAaiEntry">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!aaiContainsInfoAboutPnf}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0p09qgm" sourceRef="WaitForDmaapPnfReadyNotification" targetRef="AaiEntryUpdated" />
+ <bpmn:sequenceFlow id="SequenceFlow_17s9025" sourceRef="AaiEntryExists" targetRef="InformDmaapClient" />
+ <bpmn:sequenceFlow id="SequenceFlow_1qr6cmf" sourceRef="CreateAndActivatePnf_CreateAaiEntry" targetRef="AaiEntryExists" />
+ <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" />
+ <bpmn:sequenceFlow id="SequenceFlow_0j5ksz1" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="CheckInputs" />
+ <bpmn:sequenceFlow id="SequenceFlow_1miyzfe" sourceRef="CancelDmaapClientSubscription" targetRef="ThrowTimeoutException" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ls8pua" name="No" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryExists">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!aaiContainsInfoAboutIp}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="DoesAaiContainInfoAboutIp">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutPnf}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1h6yz62" name="Yes" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryAlreadyUpToDate">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutIp}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated">
+ <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="ThrowTimeoutException" name="Throw timeout exception">
+ <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1" />
+ </bpmn:endEvent>
+ <bpmn:endEvent id="AaiEntryAlreadyUpToDate" name="AAI entry already up-to-date">
+ <bpmn:incoming>SequenceFlow_1h6yz62</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:startEvent id="CreateAndActivatePnf_StartEvent">
+ <bpmn:outgoing>SequenceFlow_0j5ksz1</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0967g8p" sourceRef="CheckInputs" targetRef="CheckAiiForCorrelationId" />
+ <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${checkAaiForCorrelationIdDelegate}">
+ <bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutPnf" name="Does AAI contain info about pnf?">
+ <bpmn:incoming>SequenceFlow_1j4r3zt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:serviceTask id="CreateAndActivatePnf_CreateAaiEntry" name="Create AAI entry with pnf-id = correlation_id" camunda:delegateExpression="${createAaiEntryWithPnfIdDelegate}">
+ <bpmn:incoming>SequenceFlow_0v5ffpe</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1qr6cmf</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutIp" name="Does AAI contain info about IPv4 or IPv6?">
+ <bpmn:incoming>SequenceFlow_1l1t6ak</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1h6yz62</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1ls8pua</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:intermediateThrowEvent id="AaiEntryExists" name="AAI entry exists, lacking IP">
+ <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1ls8pua</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing>
+ </bpmn:intermediateThrowEvent>
+ <bpmn:serviceTask id="InformDmaapClient" name="Inform DmaapClient about business key and corresponding pnf-id" camunda:delegateExpression="${informDmaapClient}">
+ <bpmn:incoming>SequenceFlow_17s9025</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1o8od8e</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:receiveTask id="WaitForDmaapPnfReadyNotification" name="Wait for DMAAP pnf-ready notification" messageRef="Message_13h1tlo">
+ <bpmn:incoming>SequenceFlow_1o8od8e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0p09qgm</bpmn:outgoing>
+ </bpmn:receiveTask>
+ <bpmn:boundaryEvent id="WaitForDmaapTimeout" name="Timeout" attachedToRef="WaitForDmaapPnfReadyNotification">
+ <bpmn:outgoing>SequenceFlow_1kc34bc</bpmn:outgoing>
+ <bpmn:timerEventDefinition>
+ <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">#{timeoutForPnfEntryNotification}</bpmn:timeDuration>
+ </bpmn:timerEventDefinition>
+ </bpmn:boundaryEvent>
+ <bpmn:serviceTask id="CancelDmaapClientSubscription" name="Cancel DmaapClient subscription" camunda:delegateExpression="${cancelDmaapSubscription}">
+ <bpmn:incoming>SequenceFlow_1kc34bc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1miyzfe</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${pnfCheckInputs}">
+ <bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:textAnnotation id="TextAnnotation_1eyzes8">
+ <bpmn:text><![CDATA[Inputs:
+ - timeoutForPnfEntryNotification - String
+ - correlationId - String
+]]></bpmn:text>
+ </bpmn:textAnnotation>
+ <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" />
+ </bpmn:process>
+ <bpmn:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn:message id="Message_13h1tlo" name="WorkflowMessage" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1d0w8lf">
+ <bpmndi:BPMNShape id="Participant_1egg397_di" bpmnElement="Participant_1egg397">
+ <dc:Bounds x="-113" y="0" width="1601" height="438" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1cttgdo_di" bpmnElement="DoesAaiContainInfoAboutPnf" isMarkerVisible="true">
+ <dc:Bounds x="390" y="182" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="372" y="283" width="85" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0yamdfm_di" bpmnElement="DoesAaiContainInfoAboutIp" isMarkerVisible="true">
+ <dc:Bounds x="682" y="41" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="663" y="5" width="87" height="30" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0k52gr7_di" bpmnElement="AaiEntryUpdated">
+ <dc:Bounds x="1312" y="189" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1286" y="230" width="89" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0j5ok9h_di" bpmnElement="CreateAndActivatePnf_StartEvent">
+ <dc:Bounds x="-54" y="189" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-80" y="228" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0a5uk9o_di" bpmnElement="CheckAiiForCorrelationId">
+ <dc:Bounds x="219" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0iimk5v_di" bpmnElement="CreateAndActivatePnf_CreateAaiEntry">
+ <dc:Bounds x="511" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j4r3zt_di" bpmnElement="SequenceFlow_1j4r3zt">
+ <di:waypoint xsi:type="dc:Point" x="319" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309.5" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1l1t6ak_di" bpmnElement="SequenceFlow_1l1t6ak">
+ <di:waypoint xsi:type="dc:Point" x="415" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="415" y="66" />
+ <di:waypoint xsi:type="dc:Point" x="682" y="66" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="430" y="180.1206896551724" width="19" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v5ffpe_di" bpmnElement="SequenceFlow_0v5ffpe">
+ <di:waypoint xsi:type="dc:Point" x="440" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="511" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="447.32911392405055" y="210" width="15" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h6yz62_di" bpmnElement="SequenceFlow_1h6yz62">
+ <di:waypoint xsi:type="dc:Point" x="732" y="66" />
+ <di:waypoint xsi:type="dc:Point" x="1312" y="66" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="742.7435064935065" y="51" width="19" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ls8pua_di" bpmnElement="SequenceFlow_1ls8pua">
+ <di:waypoint xsi:type="dc:Point" x="707" y="91" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="116.1917808219178" width="15" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qr6cmf_di" bpmnElement="SequenceFlow_1qr6cmf">
+ <di:waypoint xsi:type="dc:Point" x="611" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="689" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="605" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j5ksz1_di" bpmnElement="SequenceFlow_0j5ksz1">
+ <di:waypoint xsi:type="dc:Point" x="-18" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="48" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-30" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Participant_0i9ban2_di" bpmnElement="Participant_0atuyq0">
+ <dc:Bounds x="123" y="523" width="502" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="MessageFlow_1h3xu88_di" bpmnElement="MessageFlow_1h3xu88">
+ <di:waypoint xsi:type="dc:Point" x="561" y="247" />
+ <di:waypoint xsi:type="dc:Point" x="561" y="523" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="531" y="380" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="MessageFlow_09ibv5a_di" bpmnElement="MessageFlow_09ibv5a">
+ <di:waypoint xsi:type="dc:Point" x="250" y="247" />
+ <di:waypoint xsi:type="dc:Point" x="250" y="523" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="220" y="380" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="MessageFlow_0vjul4t_di" bpmnElement="MessageFlow_0vjul4t">
+ <di:waypoint xsi:type="dc:Point" x="289" y="523" />
+ <di:waypoint xsi:type="dc:Point" x="289" y="247" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="259" y="380" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Participant_0vmrrhf_di" bpmnElement="Participant_19w87ws">
+ <dc:Bounds x="804" y="523" width="463" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0wbx6tt_di" bpmnElement="ThrowTimeoutException">
+ <dc:Bounds x="1312" y="345" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1305" y="382" width="70" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_00cy7r0_di" bpmnElement="AaiEntryAlreadyUpToDate">
+ <dc:Bounds x="1312" y="48" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1288" y="89" width="85" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0fjcdy4_di" bpmnElement="AaiEntryExists">
+ <dc:Bounds x="689" y="189" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="670" y="235" width="80" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_1eyzes8_di" bpmnElement="TextAnnotation_1eyzes8">
+ <dc:Bounds x="-37" y="70" width="243" height="54" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0d7oxnz_di" bpmnElement="Association_0d7oxnz">
+ <di:waypoint xsi:type="dc:Point" x="-36" y="189" />
+ <di:waypoint xsi:type="dc:Point" x="-36" y="124" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="MessageFlow_1vrcp2d_di" bpmnElement="MessageFlow_1vrcp2d">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="523" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="247" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="996" y="380" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17s9025_di" bpmnElement="SequenceFlow_17s9025">
+ <di:waypoint xsi:type="dc:Point" x="725" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_15eo1k9_di" bpmnElement="WaitForDmaapTimeout">
+ <dc:Bounds x="1040" y="229" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1071" y="260" width="40" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kc34bc_di" bpmnElement="SequenceFlow_1kc34bc">
+ <di:waypoint xsi:type="dc:Point" x="1058" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="363" />
+ <di:waypoint xsi:type="dc:Point" x="1145" y="363" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="309" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ReceiveTask_1sfysua_di" bpmnElement="WaitForDmaapPnfReadyNotification">
+ <dc:Bounds x="974" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p09qgm_di" bpmnElement="SequenceFlow_0p09qgm">
+ <di:waypoint xsi:type="dc:Point" x="1074" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="1312" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1148" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o8od8e_di" bpmnElement="SequenceFlow_1o8od8e">
+ <di:waypoint xsi:type="dc:Point" x="903" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="974" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="893.5" y="187" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="MessageFlow_0tg4hw9_di" bpmnElement="MessageFlow_0tg4hw9">
+ <di:waypoint xsi:type="dc:Point" x="853" y="247" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="523" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="823" y="380" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1iax11n_di" bpmnElement="InformDmaapClient">
+ <dc:Bounds x="803" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1miyzfe_di" bpmnElement="SequenceFlow_1miyzfe">
+ <di:waypoint xsi:type="dc:Point" x="1245" y="363" />
+ <di:waypoint xsi:type="dc:Point" x="1312" y="363" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1233.5" y="343" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="MessageFlow_1py54jr_di" bpmnElement="MessageFlow_1py54jr">
+ <di:waypoint xsi:type="dc:Point" x="1195" y="403" />
+ <di:waypoint xsi:type="dc:Point" x="1195" y="523" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1165" y="458" width="90" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_12j7hox_di" bpmnElement="CancelDmaapClientSubscription">
+ <dc:Bounds x="1145" y="323" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0967g8p_di" bpmnElement="SequenceFlow_0967g8p">
+ <di:waypoint xsi:type="dc:Point" x="148" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="219" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="183.5" y="187" width="0" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0lx02qn_di" bpmnElement="CheckInputs">
+ <dc:Bounds x="48" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..6f73b46e2e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="CreateCustomE2EServiceInstance" name="CreateCustomE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_00qj6ro" name="Create SI Start Flow">
+ <bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:subProcess id="SubProcess_0ka59nc" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0u3lw39" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1dsbjjb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yay321</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_0v1ffn4">
+ <bpmn:outgoing>SequenceFlow_1dsbjjb</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0eznq6x">
+ <bpmn:incoming>SequenceFlow_1yay321</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
+ </bpmn:subProcess>
+ <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstanceV3">
+ <bpmn:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ <camunda:in source="initialStatus" target="initialStatus" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="requestAction" target="operationType" />
+ <camunda:in source="operationId" target="operationId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_19eilro</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:endEvent id="EndEvent_0bpd6c0" name="End">
+ <bpmn:incoming>SequenceFlow_0yayvrf</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_1s09c7d" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0s2spoq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0z4faf9</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateCustomE2EServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_0ttvn8r" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_14zu6wr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0je30si</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_02fyxz0" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0je30si</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yayvrf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_0vaws86" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0dug28e">
+ <bpmn:outgoing>SequenceFlow_0e1r62n</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_03wysuk">
+ <bpmn:incoming>SequenceFlow_1ysapam</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0u8o9p2" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0n9pexp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01umodj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1ang7q8" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_01umodj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ysapam</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="ScriptTask_1rn6nqi" name="Send Error Response">
+ <bpmn:incoming>SequenceFlow_0e1r62n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0n9pexp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.sendSyncError(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1r62n" sourceRef="StartEvent_0dug28e" targetRef="ScriptTask_1rn6nqi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ysapam" sourceRef="CallActivity_1ang7q8" targetRef="EndEvent_03wysuk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0n9pexp" sourceRef="ScriptTask_1rn6nqi" targetRef="ScriptTask_0u8o9p2" />
+ <bpmn:sequenceFlow id="SequenceFlow_01umodj" sourceRef="ScriptTask_0u8o9p2" targetRef="CallActivity_1ang7q8" />
+ </bpmn:subProcess>
+ <bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_081z8l2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_19eilro</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0aqn64l" name="Success?">
+ <bpmn:incoming>SequenceFlow_0klbpxx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14zu6wr</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1fueo69</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_07uk5iy">
+ <bpmn:incoming>SequenceFlow_1fueo69</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_0nbdy47" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0s2spoq" sourceRef="StartEvent_00qj6ro" targetRef="ScriptTask_1s09c7d" />
+ <bpmn:sequenceFlow id="SequenceFlow_19eilro" sourceRef="ScriptTask_0xupxj9" targetRef="DoCreateE2EServiceInstance" />
+ <bpmn:sequenceFlow id="SequenceFlow_0klbpxx" sourceRef="DoCreateE2EServiceInstance" targetRef="ExclusiveGateway_0aqn64l" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yayvrf" sourceRef="CallActivity_02fyxz0" targetRef="EndEvent_0bpd6c0" />
+ <bpmn:sequenceFlow id="SequenceFlow_0z4faf9" sourceRef="ScriptTask_1s09c7d" targetRef="Task_1tqjch6" />
+ <bpmn:sequenceFlow id="SequenceFlow_14zu6wr" name="yes" sourceRef="ExclusiveGateway_0aqn64l" targetRef="ScriptTask_0ttvn8r">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression>
+ </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:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1euqjsp" sourceRef="Task_1tqjch6" targetRef="Task_19mxcw3" />
+ <bpmn:scriptTask id="Task_1tqjch6" name="Init Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0z4faf9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1euqjsp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_19mxcw3" name="Update Service Operation Status">
+ <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_updateServiceOperStatusRequest}</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_1euqjsp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_081z8l2</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_081z8l2" sourceRef="Task_19mxcw3" targetRef="ScriptTask_0xupxj9" />
+ </bpmn:process>
+ <bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateCustomE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
+ <dc:Bounds x="-6" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-24" y="221" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0ka59nc_di" bpmnElement="SubProcess_0ka59nc" isExpanded="true">
+ <dc:Bounds x="463" y="632" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0rhljy8_di" bpmnElement="DoCreateE2EServiceInstance">
+ <dc:Bounds x="751" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0bpd6c0_di" bpmnElement="EndEvent_0bpd6c0">
+ <dc:Bounds x="1258" y="286" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1268" y="322" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
+ <dc:Bounds x="115" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ttvn8r_di" bpmnElement="ScriptTask_0ttvn8r">
+ <dc:Bounds x="1038" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_02fyxz0_di" bpmnElement="CallActivity_02fyxz0">
+ <dc:Bounds x="1226" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0vaws86_di" bpmnElement="SubProcess_0vaws86" isExpanded="true">
+ <dc:Bounds x="348" y="370" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xupxj9_di" bpmnElement="ScriptTask_0xupxj9">
+ <dc:Bounds x="610" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0aqn64l_di" bpmnElement="ExclusiveGateway_0aqn64l" isMarkerVisible="true">
+ <dc:Bounds x="903" y="173" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="145" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_07uk5iy_di" bpmnElement="EndEvent_07uk5iy">
+ <dc:Bounds x="910" y="286" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="322" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </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="115" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="27.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19eilro_di" bpmnElement="SequenceFlow_19eilro">
+ <di:waypoint xsi:type="dc:Point" x="710" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="751" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
+ <di:waypoint xsi:type="dc:Point" x="851" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="903" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
+ <di:waypoint xsi:type="dc:Point" x="1276" y="238" />
+ <di:waypoint xsi:type="dc:Point" x="1276" y="286" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1246" y="262" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0z4faf9_di" bpmnElement="SequenceFlow_0z4faf9">
+ <di:waypoint xsi:type="dc:Point" x="215" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="199" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14zu6wr_di" bpmnElement="SequenceFlow_14zu6wr">
+ <di:waypoint xsi:type="dc:Point" x="953" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="990" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="990" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="1038" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="987" y="195" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0je30si_di" bpmnElement="SequenceFlow_0je30si">
+ <di:waypoint xsi:type="dc:Point" x="1138" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1137" y="183" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fueo69_di" bpmnElement="SequenceFlow_1fueo69">
+ <di:waypoint xsi:type="dc:Point" x="928" y="223" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="250" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="250" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="286" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="901" y="228" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u3lw39_di" bpmnElement="ScriptTask_0u3lw39">
+ <dc:Bounds x="611" y="687" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0v1ffn4_di" bpmnElement="StartEvent_0v1ffn4">
+ <dc:Bounds x="496" y="709" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="469" y="750" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0eznq6x_di" bpmnElement="EndEvent_0eznq6x">
+ <dc:Bounds x="772" y="709" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="745" y="750" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0dug28e_di" bpmnElement="StartEvent_0dug28e">
+ <dc:Bounds x="363" y="456" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="497" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_03wysuk_di" bpmnElement="EndEvent_03wysuk">
+ <dc:Bounds x="942" y="456" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="915" y="497" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0u8o9p2_di" bpmnElement="ScriptTask_0u8o9p2">
+ <dc:Bounds x="621" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ang7q8_di" bpmnElement="CallActivity_1ang7q8">
+ <dc:Bounds x="798" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rn6nqi_di" bpmnElement="ScriptTask_1rn6nqi">
+ <dc:Bounds x="443" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dsbjjb_di" bpmnElement="SequenceFlow_1dsbjjb">
+ <di:waypoint xsi:type="dc:Point" x="532" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="611" y="727" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="529.5" y="727" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yay321_di" bpmnElement="SequenceFlow_1yay321">
+ <di:waypoint xsi:type="dc:Point" x="711" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="727" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701.5" y="727" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1r62n_di" bpmnElement="SequenceFlow_0e1r62n">
+ <di:waypoint xsi:type="dc:Point" x="399" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391" y="474" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ysapam_di" bpmnElement="SequenceFlow_1ysapam">
+ <di:waypoint xsi:type="dc:Point" x="898" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="942" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="875" y="459" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n9pexp_di" bpmnElement="SequenceFlow_0n9pexp">
+ <di:waypoint xsi:type="dc:Point" x="543" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="570" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="570" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="621" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="540" y="474" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01umodj_di" bpmnElement="SequenceFlow_01umodj">
+ <di:waypoint xsi:type="dc:Point" x="721" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="798" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715.5" y="459" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1euqjsp_di" bpmnElement="SequenceFlow_1euqjsp">
+ <di:waypoint xsi:type="dc:Point" x="373" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="446" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="364.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1a3vwas_di" bpmnElement="Task_1tqjch6">
+ <dc:Bounds x="273" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1afiuuq_di" bpmnElement="Task_19mxcw3">
+ <dc:Bounds x="446" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_081z8l2_di" bpmnElement="SequenceFlow_081z8l2">
+ <di:waypoint xsi:type="dc:Point" x="546" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="610" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="533" y="177" width="90" 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
new file mode 100644
index 0000000000..3d08fdb1d4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="Call DoCreateServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="bpmnRequest" target="requestJson" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1hjh5zy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doCreateServiceInstance_CallActivity" targetRef="ExclusiveGateway_1x5i9c1" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateGenericALaCarteServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createSI_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1o4wwba</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateGenericALaCarteServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateGenericALaCarteServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_0o4smqp" />
+ <bpmn2:scriptTask id="ScriptTask_0o4smqp" name="Send Error Response">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateGenericALaCarteServiceInstance()
+csi.sendSyncError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16vhtu8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateGenericALaCarteServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1x5i9c1" name="Success?">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o4wwba</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1mdnv3l</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="EndEvent_143akoz">
+ <bpmn2:incoming>SequenceFlow_1mdnv3l</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1o4wwba" name="yes" sourceRef="ExclusiveGateway_1x5i9c1" targetRef="ScriptTask_0cihgpv">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mdnv3l" name="no" sourceRef="ExclusiveGateway_1x5i9c1" targetRef="EndEvent_143akoz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0y5991s" name="GoDecompose">
+ <bpmn2:incoming>SequenceFlow_16vhtu8</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16vhtu8" sourceRef="Task_1nko5zz" targetRef="IntermediateThrowEvent_0y5991s" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_00tv706" name="Decompose">
+ <bpmn2:outgoing>SequenceFlow_1tfe975</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1aouco1" name="CreateSI">
+ <bpmn2:outgoing>SequenceFlow_1hjh5zy</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateSI" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1tbopzu" name="GoToCreateSI">
+ <bpmn2:incoming>SequenceFlow_14ajbme</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateSI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1vr3ks5" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1tfe975</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xhu1k3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateGenericALaCarteServiceInstance()
+csi.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1oc1h9q" name="DecomposeService" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xhu1k3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o3ihrh</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_04zaa1o" name="Prepare&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1o3ihrh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14ajbme</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateGenericALaCarteServiceInstance()
+csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xhu1k3" sourceRef="ScriptTask_1vr3ks5" targetRef="CallActivity_1oc1h9q" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1o3ihrh" sourceRef="CallActivity_1oc1h9q" targetRef="ScriptTask_04zaa1o" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1tfe975" sourceRef="IntermediateCatchEvent_00tv706" targetRef="ScriptTask_1vr3ks5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14ajbme" sourceRef="ScriptTask_04zaa1o" targetRef="IntermediateThrowEvent_1tbopzu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1hjh5zy" sourceRef="IntermediateCatchEvent_1aouco1" targetRef="doCreateServiceInstance_CallActivity" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateGenericALaCarteServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="-6" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-25" y="120" width="74" height="26" />
+ </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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="333" y="957" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="351" y="998" width="0" 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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="609" y="957" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="998" width="0" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="411" y="975" width="0" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="583" y="975" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="112" y="452" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="852" y="474" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="863" y="510" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="212" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="314" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="263" y="477" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="112" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="30" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="112" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="71" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="449" y="452" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="637" y="452" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="549" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="637" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="593" y="477" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="443" y="731" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="620" y="731" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="170" y="667" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="185" y="753" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="203" y="794" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="764" y="753" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="782" y="794" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="543" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="620" y="771" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="756" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="720" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="771" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="742" y="756" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="737" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="852" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="795" y="477" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="221" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="243" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="243" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="264" y="771" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="771" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="342" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ktadna_di" bpmnElement="SequenceFlow_0ktadna">
+ <di:waypoint xsi:type="dc:Point" x="212" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o4smqp_di" bpmnElement="ScriptTask_0o4smqp">
+ <dc:Bounds x="265" y="731" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14eadeb_di" bpmnElement="SequenceFlow_14eadeb">
+ <di:waypoint xsi:type="dc:Point" x="365" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="771" />
+ <di:waypoint xsi:type="dc:Point" x="443" y="771" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="407" y="771" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x5i9c1_di" bpmnElement="ExclusiveGateway_1x5i9c1" isMarkerVisible="true">
+ <dc:Bounds x="314" y="467" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="314" y="439" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_143akoz_di" bpmnElement="EndEvent_143akoz">
+ <dc:Bounds x="321" y="580" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="417" y="965" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o4wwba_di" bpmnElement="SequenceFlow_1o4wwba">
+ <di:waypoint xsi:type="dc:Point" x="364" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="401" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="401" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="399" y="489" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mdnv3l_di" bpmnElement="SequenceFlow_1mdnv3l">
+ <di:waypoint xsi:type="dc:Point" x="339" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="339" y="544" />
+ <di:waypoint xsi:type="dc:Point" x="339" y="544" />
+ <di:waypoint xsi:type="dc:Point" x="339" y="580" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="313" y="522" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0y5991s_di" bpmnElement="IntermediateThrowEvent_0y5991s">
+ <dc:Bounds x="587" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="568" y="120" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16vhtu8_di" bpmnElement="SequenceFlow_16vhtu8">
+ <di:waypoint xsi:type="dc:Point" x="442" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="587" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_00tv706_di" bpmnElement="IntermediateCatchEvent_00tv706">
+ <dc:Bounds x="-6" y="272" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-19" y="308" width="59" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1aouco1_di" bpmnElement="IntermediateCatchEvent_1aouco1">
+ <dc:Bounds x="-6" y="474" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-11" y="510" width="43" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1tbopzu_di" bpmnElement="IntermediateThrowEvent_1tbopzu">
+ <dc:Bounds x="852" y="272" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="313" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1vr3ks5_di" bpmnElement="ScriptTask_1vr3ks5">
+ <dc:Bounds x="112" y="250" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1oc1h9q_di" bpmnElement="CallActivity_1oc1h9q">
+ <dc:Bounds x="342" y="250" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04zaa1o_di" bpmnElement="ScriptTask_04zaa1o">
+ <dc:Bounds x="555" y="250" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xhu1k3_di" bpmnElement="SequenceFlow_0xhu1k3">
+ <di:waypoint xsi:type="dc:Point" x="212" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="275" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o3ihrh_di" bpmnElement="SequenceFlow_1o3ihrh">
+ <di:waypoint xsi:type="dc:Point" x="442" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="275" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tfe975_di" bpmnElement="SequenceFlow_1tfe975">
+ <di:waypoint xsi:type="dc:Point" x="30" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="69" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="69" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="112" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="290" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14ajbme_di" bpmnElement="SequenceFlow_14ajbme">
+ <di:waypoint xsi:type="dc:Point" x="655" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="852" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="754" y="265" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hjh5zy_di" bpmnElement="SequenceFlow_1hjh5zy">
+ <di:waypoint xsi:type="dc:Point" x="30" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="112" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="71" y="467" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateNetworkInstance.bpmn
new file mode 100644
index 0000000000..9b21b9309f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateNetworkInstance.bpmn
@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateNetworkInstance" name="CreateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def networkMod = new CreateNetworkInstance()
+networkMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doCreateNetworkInstance_CallActivity" name="DoCreate Network Instance&#10;" calledElement="DoCreateNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="networkName" target="networkName" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="CreateNetwork&#10;PostProcess Success&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doCreateNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def preProcess = new CreateNetworkInstance()
+preProcess.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.prepareCompletion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ScriptTask_1hql91g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doCreateNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.sendSyncResponse(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-8" y="786" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="25" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="140" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="301" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="319" y="904" width="0" 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="61" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="881" width="0" 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="240" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateNetworkInstance_CallActivity">
+ <dc:Bounds x="692" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="792" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="907" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="39" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint xsi:type="dc:Point" x="239" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="907" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1071" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b">
+ <dc:Bounds x="300" y="520" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1007" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="543" y="520" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="807" y="520" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="56" y="348" width="1021" height="404" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="152" y="542" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="583" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="982" y="542" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1000" y="583" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb">
+ <di:waypoint xsi:type="dc:Point" x="400" y="560" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="560" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="472" y="545" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="643" y="560" />
+ <di:waypoint xsi:type="dc:Point" x="807" y="560" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="545" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="907" y="560" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="560" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="545" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1171" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1212" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="188" y="560" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="560" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="244" y="545" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint xsi:type="dc:Point" x="472" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="658" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="692" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="675" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="372" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="558" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
new file mode 100644
index 0000000000..29207131b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
@@ -0,0 +1,287 @@
+<?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.16.2">
+ <bpmn:process id="CreateSDNCNetworkResource" name="CreateSDNCNetworkResource" isExecutable="true">
+ <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="Task_1dlrfiw" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0tezqd4" />
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.prepareSDNCRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_1x6k78c" name="create SDNC call end">
+ <bpmn:incoming>SequenceFlow_0auvfvm</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC Create&#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRESDNCRES_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRESDNCRES_sdncCreateReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="CRESDNCRES_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ex9ov6</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_023hred" name="post SDNC create call">
+ <bpmn:incoming>SequenceFlow_1ex9ov6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1kzj1j5</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.postCreateSDNCCall(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
+ <bpmn:script>String recipeParamXsdDemo="""{"operationType":"GRE"}"""
+String recipeParamXsd=""
+execution.setVariable("recipeParamXsd", recipeParamXsd)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0w2es8j</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" />
+ <bpmn:sequenceFlow id="SequenceFlow_15mvedq" sourceRef="Task_18tomkl" targetRef="CallActivity_1600xlj" />
+ <bpmn:scriptTask id="Task_0tezqd4" name="Create progress update parameters before create" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.prepareUpdateBeforeCreateSDNCResource(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_18tomkl" name="update 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_1mz0vdx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update 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_1kzj1j5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0o7h0ag</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1cd8ujq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0auvfvm</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateSDNCNetworkResource()
+csi.sendSyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0cdulnk" name="is activate required">
+ <bpmn:incoming>SequenceFlow_0o7h0ag</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1dww8ye</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_05m2j56</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1dww8ye" name="yes" sourceRef="ExclusiveGateway_0cdulnk" targetRef="Task_0bga3e8">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isActivateRequired") == "true")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1ex9ov6" sourceRef="CallActivity_1600xlj" targetRef="Task_023hred" />
+ <bpmn:sequenceFlow id="SequenceFlow_1kzj1j5" sourceRef="Task_023hred" targetRef="ServiceTask_1cm8iwr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0o7h0ag" sourceRef="ServiceTask_1cm8iwr" targetRef="ExclusiveGateway_0cdulnk" />
+ <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After create" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_05m2j56</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_05niqbf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1cd8ujq</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateSDNCNetworkResource()
+dcsi.prepareUpdateAfterCreateSDNCResource(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05m2j56" name="No" sourceRef="ExclusiveGateway_0cdulnk" targetRef="Task_0uwlr22" />
+ <bpmn:sequenceFlow id="SequenceFlow_05niqbf" sourceRef="Task_0bga3e8" targetRef="Task_0uwlr22" />
+ <bpmn:sequenceFlow id="SequenceFlow_1cd8ujq" sourceRef="Task_0uwlr22" targetRef="ScriptTask_1g5zyi6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0auvfvm" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
+ <bpmn:callActivity id="Task_0bga3e8" name="call Activate SDNC network Resource" calledElement="ActivateSDNCNetworkResource">
+ <bpmn:incoming>SequenceFlow_1dww8ye</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05niqbf</bpmn:outgoing>
+ </bpmn:callActivity>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateSDNCNetworkResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
+ <dc:Bounds x="-111" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-135" y="147" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <di:waypoint x="-75" y="129" />
+ <di:waypoint x="-10" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-87.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+ <di:waypoint x="413" y="129" />
+ <di:waypoint x="460" y="129" />
+ <di:waypoint x="500" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="313" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="1046" y="317" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1009" y="359" width="84" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
+ <dc:Bounds x="-10" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+ <dc:Bounds x="172" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
+ <di:waypoint x="90" y="129" />
+ <di:waypoint x="148" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="74" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+ <di:waypoint x="248" y="129" />
+ <di:waypoint x="313" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
+ <dc:Bounds x="-10" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+ <dc:Bounds x="148" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
+ <di:waypoint x="606" y="129" />
+ <di:waypoint x="638" y="129" />
+ <di:waypoint x="638" y="129" />
+ <di:waypoint x="738" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="123" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq">
+ <di:waypoint x="788" y="169" />
+ <di:waypoint x="788" y="218" />
+ <di:waypoint x="-89" y="218" />
+ <di:waypoint x="-89" y="335" />
+ <di:waypoint x="-10" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="197" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+ <dc:Bounds x="506" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
+ <dc:Bounds x="738" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+ <dc:Bounds x="366" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+ <dc:Bounds x="890" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0cdulnk_di" bpmnElement="ExclusiveGateway_0cdulnk" isMarkerVisible="true">
+ <dc:Bounds x="539" y="310" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="273" width="49" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dww8ye_di" bpmnElement="SequenceFlow_1dww8ye">
+ <di:waypoint x="564" y="360" />
+ <di:waypoint x="564" y="471" />
+ <di:waypoint x="608" y="471" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="571" y="391" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ex9ov6_di" bpmnElement="SequenceFlow_1ex9ov6">
+ <di:waypoint x="90" y="335" />
+ <di:waypoint x="172" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kzj1j5_di" bpmnElement="SequenceFlow_1kzj1j5">
+ <di:waypoint x="272" y="335" />
+ <di:waypoint x="366" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o7h0ag_di" bpmnElement="SequenceFlow_0o7h0ag">
+ <di:waypoint x="466" y="335" />
+ <di:waypoint x="539" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
+ <dc:Bounds x="721" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05m2j56_di" bpmnElement="SequenceFlow_05m2j56">
+ <di:waypoint x="589" y="335" />
+ <di:waypoint x="721" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="648" y="317" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05niqbf_di" bpmnElement="SequenceFlow_05niqbf">
+ <di:waypoint x="708" y="471" />
+ <di:waypoint x="771" y="471" />
+ <di:waypoint x="771" y="375" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cd8ujq_di" bpmnElement="SequenceFlow_1cd8ujq">
+ <di:waypoint x="821" y="335" />
+ <di:waypoint x="890" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0auvfvm_di" bpmnElement="SequenceFlow_0auvfvm">
+ <di:waypoint x="990" y="335" />
+ <di:waypoint x="1046" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0aywvn3_di" bpmnElement="Task_0bga3e8">
+ <dc:Bounds x="608" y="431" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVFCNSResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVFCNSResource.bpmn
new file mode 100644
index 0000000000..9724a9313d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVFCNSResource.bpmn
@@ -0,0 +1,277 @@
+<?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.10.0">
+ <bpmn:process id="CreateVFCNSResource" name="CreateVFCNSResource" isExecutable="true">
+ <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_09nzhwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_1uiz85h" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_0zfksms" />
+ <bpmn:scriptTask id="Task_09nzhwk" name="Create Network Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1uiz85h</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.createNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="instantiate_NSTask" name="Instantiate Network Service" scriptFormat="groovy">
+ <bpmn:incoming>createNSSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ywe21t</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.instantiateNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0zfksms" name="Create NS Success?">
+ <bpmn:incoming>SequenceFlow_1uiz85h</bpmn:incoming>
+ <bpmn:outgoing>createNSSuccess_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>createNSFailed_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="createNSSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_0zfksms" targetRef="instantiate_NSTask">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("nsInstanceId" ) != null && execution.getVariable("nsInstanceId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="createNSFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_0zfksms" targetRef="createNSFailed_EndEvent">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("nsInstanceId" ) == null || execution.getVariable("nsInstanceId" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1is7zys" name="Instantiate NS Success?">
+ <bpmn:incoming>SequenceFlow_1ywe21t</bpmn:incoming>
+ <bpmn:outgoing>instantiateFailed_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>instantiateSuccess_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1ywe21t" sourceRef="instantiate_NSTask" targetRef="ExclusiveGateway_1is7zys" />
+ <bpmn:sequenceFlow id="instantiateFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_1is7zys" targetRef="EndEvent_1gkvvpn">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) == null || execution.getVariable("jobId" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="instantiateSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_1is7zys" targetRef="queryJob_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) != null && execution.getVariable("jobId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_15492gl" name="Instantiate Finished?">
+ <bpmn:incoming>SequenceFlow_0xqo13p</bpmn:incoming>
+ <bpmn:outgoing>operationFinished_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>operationProcessing_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="operationFinished_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_15492gl" targetRef="finishNSCreate_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) != "processing" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="operationProcessing_SequenceFlow" name="no" sourceRef="ExclusiveGateway_15492gl" targetRef="timeDelay_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) == "processing" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0cq2q6g" sourceRef="finishNSCreate_Task" targetRef="ScriptTask_1890l78" />
+ <bpmn:endEvent id="createNSFailed_EndEvent" name="createNSFailed">
+ <bpmn:incoming>createNSFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1gkvvpn">
+ <bpmn:incoming>instantiateFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1x6k78c">
+ <bpmn:incoming>SequenceFlow_1lwqmo9</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="queryJob_Task" name="Query NS Progress" scriptFormat="groovy">
+ <bpmn:incoming>instantiateSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1gsbpxj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xqo13p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.queryNSProgress(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="finishNSCreate_Task" name="Add NS Relationship" scriptFormat="groovy">
+ <bpmn:incoming>operationFinished_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0cq2q6g</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.addNSRelationship(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0xqo13p" sourceRef="queryJob_Task" targetRef="ExclusiveGateway_15492gl" />
+ <bpmn:scriptTask id="timeDelay_Task" name="timeDelay" scriptFormat="groovy">
+ <bpmn:incoming>operationProcessing_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1gsbpxj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateVFCNSResource()
+dcsi.timeDelay(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1gsbpxj" sourceRef="timeDelay_Task" targetRef="queryJob_Task" />
+ <bpmn:scriptTask id="ScriptTask_1890l78" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0cq2q6g</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lwqmo9</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateVFCNSResource()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1lwqmo9" sourceRef="ScriptTask_1890l78" targetRef="EndEvent_1x6k78c" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVFCNSResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
+ <dc:Bounds x="175" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="152" y="147" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <di:waypoint xsi:type="dc:Point" x="211" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="251" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="251" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="123" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+ <di:waypoint xsi:type="dc:Point" x="393" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="479" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="436" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uiz85h_di" bpmnElement="SequenceFlow_1uiz85h">
+ <di:waypoint xsi:type="dc:Point" x="579" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="631" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk">
+ <dc:Bounds x="479" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="293" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="instantiate_NSTask">
+ <dc:Bounds x="839" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0zfksms_di" bpmnElement="ExclusiveGateway_0zfksms" isMarkerVisible="true">
+ <dc:Bounds x="683" y="104" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685" y="158" width="52" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rt03zl_di" bpmnElement="createNSSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="733" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="839" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="108" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0df541u_di" bpmnElement="createNSFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="708" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="63" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1is7zys_di" bpmnElement="ExclusiveGateway_1is7zys" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="105" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="159" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ywe21t_di" bpmnElement="SequenceFlow_1ywe21t">
+ <di:waypoint xsi:type="dc:Point" x="939" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="1034" y="130" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986.5" y="108.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j7xo94_di" bpmnElement="instantiateFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="105" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1068" y="63" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ui2n9l_di" bpmnElement="instantiateSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="271" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="207" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_15492gl_di" bpmnElement="ExclusiveGateway_15492gl" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="570" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1038" y="624" width="50" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hftgi6_di" bpmnElement="operationFinished_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="902" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="929.1428571428571" y="574" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0omec46_di" bpmnElement="operationProcessing_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1131" y="607" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cq2q6g_di" bpmnElement="SequenceFlow_0cq2q6g">
+ <di:waypoint xsi:type="dc:Point" x="802" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="690" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="574" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ido9wi_di" bpmnElement="createNSFailed_EndEvent">
+ <dc:Bounds x="690" y="-3" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="37" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0xgvlmx_di" bpmnElement="EndEvent_1gkvvpn">
+ <dc:Bounds x="1041" y="-3" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1014" y="37" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="484" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="617" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sxy5we_di" bpmnElement="queryJob_Task">
+ <dc:Bounds x="1009" y="271" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSCreate_Task">
+ <dc:Bounds x="802" y="555" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xqo13p_di" bpmnElement="SequenceFlow_0xqo13p">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1074" y="454.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0rb5agx_di" bpmnElement="timeDelay_Task">
+ <dc:Bounds x="1162" y="406" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gsbpxj_di" bpmnElement="SequenceFlow_1gsbpxj">
+ <di:waypoint xsi:type="dc:Point" x="1212" y="406" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="311" />
+ <di:waypoint xsi:type="dc:Point" x="1109" y="311" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1227" y="352.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1890l78_di" bpmnElement="ScriptTask_1890l78">
+ <dc:Bounds x="590" y="555" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lwqmo9_di" bpmnElement="SequenceFlow_1lwqmo9">
+ <di:waypoint xsi:type="dc:Point" x="590" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="555" y="573" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
new file mode 100644
index 0000000000..9ea6a9b5c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -0,0 +1,1539 @@
+<?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:process id="CreateVcpeResCustService" name="CreateVcpeResCustService" isExecutable="true">
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVCPE_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVCPE_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vCPE-RESCUST">
+ <bpmn2:outgoing>SequenceFlow_1eu60rt</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vCPE-RESCUST" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0afe2pg</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="CVRCS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("CreateVcpeResCustServiceSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVCPE_EndEvent" />
+ <bpmn2:endEvent id="CreateVCPE_EndEvent" name="End">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="Call Create &#10;ServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rollbackData" target="DCRESI_rollbackData" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="bpmnRequest" target="requestJson" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j6sjye</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ky2sv9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovCPE-RESCUST">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vCPE-RESCUST" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler" triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1vwgs6p" name="Is Rollback On?" default="SequenceFlow_0dhf2js">
+ <bpmn2:incoming>SequenceFlow_0zq7i3q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zpbskl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dhf2js</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_0zq7i3q</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ydrtdx" name="isPONR?" default="SequenceFlow_02o4yqx">
+ <bpmn2:incoming>SequenceFlow_0zpbskl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sx5llu</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_02o4yqx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="is AR_TXC Ok?" default="SequenceFlow_19mxskt">
+ <bpmn2:incoming>SequenceFlow_0t3mtod</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1sl79hn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVRCS_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_04xute7">
+ <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jg47xm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zpbskl" name="Yes" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="ExclusiveGateway_0ydrtdx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback") != true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dhf2js" name="No" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="InclusiveGateway_0foywso" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1sx5llu" name="Yes" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="InclusiveGateway_0foywso">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_02o4yqx" name="No" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="ScriptTask_17doerz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:callActivity id="DoRollbackService_CallActivity" name="DoRollback&#10;Service&#10;" calledElement="DoCreateServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCRESI_rollbackData" target="rollbackData" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rolledBack" target="DCRESI_rolledBack" />
+ <camunda:out source="rollbackError" target="DCRESI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1a7e8l1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f1hd3l</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0foywso">
+ <bpmn2:incoming>SequenceFlow_1sx5llu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dhf2js</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rabks0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0jg47xm</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0jg47xm" sourceRef="InclusiveGateway_0foywso" targetRef="ScriptTask_0yk02h3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq">
+ <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17cz98f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1a7e8l1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sezboq" name="No" sourceRef="ExclusiveGateway_05indeh" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zq7i3q" name="" sourceRef="StartEvent_1bwmffk" targetRef="ExclusiveGateway_1vwgs6p" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0m9f5ka">
+ <bpmn2:incoming>SequenceFlow_1f1hd3l</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mbymcu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_00by7l7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lv5ld6</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ftzjjm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0dvsqpp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_06gq6em" name="is AR_BRG Ok?" default="SequenceFlow_0ya1cr3">
+ <bpmn2:incoming>SequenceFlow_12dakwh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0orpdrl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ya1cr3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_1bpuf2p" name="DoRollback&#10;BRG Allotted Resources&#10;" calledElement="DoCreateAllottedResourceBRGRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCARBRG_rollbackData" target="rollbackData" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rolledBack" target="DCARBRG_rolledBack" />
+ <camunda:out source="rollbackError" target="DCARBRG_rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0orpdrl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t3cnnx</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_131ozdf">
+ <bpmn2:incoming>SequenceFlow_0ya1cr3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1sim44y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_027lz43</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0orpdrl" name="Yes" sourceRef="ExclusiveGateway_06gq6em" targetRef="CallActivity_1bpuf2p">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARBRG_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1t3cnnx" sourceRef="CallActivity_1bpuf2p" targetRef="ExclusiveGateway_1mjdcct" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ya1cr3" name="No" sourceRef="ExclusiveGateway_06gq6em" targetRef="InclusiveGateway_131ozdf" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_14tl857" name="is VNF Ok?" default="SequenceFlow_1kpdu1j">
+ <bpmn2:incoming>SequenceFlow_027lz43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kpdu1j</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_007p8k3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_142br6v">
+ <bpmn2:incoming>SequenceFlow_1kpdu1j</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1quvahv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t3mtod</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kpdu1j" name="No" sourceRef="ExclusiveGateway_14tl857" targetRef="InclusiveGateway_142br6v" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1mjdcct" name="Rollback success?" default="SequenceFlow_0dr2fem">
+ <bpmn2:incoming>SequenceFlow_1t3cnnx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sim44y</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dr2fem</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sim44y" name="Yes" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_131ozdf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARBRG_rolledBack") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dr2fem" name="No" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_1xenadu" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05dg1m1" name="Rollback success?" default="SequenceFlow_1mbymcu">
+ <bpmn2:incoming>SequenceFlow_1mpsdaj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1quvahv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1mbymcu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1quvahv" name="Yes" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_142br6v">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rolledBack") ==true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mbymcu" name="No" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y7gtd9" name="rollback failed?" default="SequenceFlow_12dakwh">
+ <bpmn2:incoming>SequenceFlow_0ftzjjm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12dakwh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_09nn9a9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ftzjjm" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_0y7gtd9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12dakwh" name="No" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="ExclusiveGateway_06gq6em" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_1xenadu">
+ <bpmn2:incoming>SequenceFlow_1lv5ld6</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09nn9a9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dr2fem</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0dvsqpp</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lv5ld6" sourceRef="InclusiveGateway_0m9f5ka" targetRef="InclusiveGateway_1xenadu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0dvsqpp" sourceRef="InclusiveGateway_1xenadu" targetRef="ScriptTask_0wyub4x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_09nn9a9" name="Yes" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="InclusiveGateway_1xenadu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rolledBack") != null && execution.getVariable("rolledBack") == false}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_027lz43" sourceRef="InclusiveGateway_131ozdf" targetRef="ExclusiveGateway_14tl857" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t3mtod" sourceRef="InclusiveGateway_142br6v" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:callActivity id="CallActivity_071yaf8" name="DoRollback&#10;TXC Allotted Resources&#10;" calledElement="DoCreateAllottedResourceTXCRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCARTXC_rollbackData" target="rollbackData" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rolledBack" target="DCARTXC_rolledBack" />
+ <camunda:out source="rollbackError" target="DCARTXC_rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1sl79hn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ne9n0g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sl79hn" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="CallActivity_071yaf8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARTXC_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y158bb" name="Rollback success?" default="SequenceFlow_00by7l7">
+ <bpmn2:incoming>SequenceFlow_0ne9n0g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00by7l7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17cz98f</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ne9n0g" sourceRef="CallActivity_071yaf8" targetRef="ExclusiveGateway_0y158bb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a7e8l1" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="DoRollbackService_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_00by7l7" name="No" sourceRef="ExclusiveGateway_0y158bb" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17cz98f" name="Yes" sourceRef="ExclusiveGateway_0y158bb" targetRef="ExclusiveGateway_05indeh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARTXC_rolledBack") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="CallActivity_1cl4iu4" name="DoRollback&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModulesRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCVAM_rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="DCVAM_rolledBack" />
+ <camunda:out source="rollbackError" target="DCVAM_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_007p8k3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mpsdaj</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mpsdaj" sourceRef="CallActivity_1cl4iu4" targetRef="ExclusiveGateway_05dg1m1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_007p8k3" name="Yes" sourceRef="ExclusiveGateway_14tl857" targetRef="CallActivity_1cl4iu4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAM_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="prepareCreateService_scriptTask" name="Prepare&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15odbkz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j6sjye</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareCreateServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR">
+ <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartService">
+ <bpmn2:incoming>SequenceFlow_1jbuf1t</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0j6sjye" sourceRef="prepareCreateService_scriptTask" targetRef="doCreateServiceInstance_CallActivity" />
+ <bpmn2:serviceTask id="updateInfraRequest" name="Update DB status to SUCCESS">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.db.endpoint", execution)}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CVRCS_setUpdateDbInstancePayload")}]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0vj46ej</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sjpja4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="Post Process&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessServiceInstanceCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ky2sv9" sourceRef="doCreateServiceInstance_CallActivity" targetRef="ScriptTask_1qd3uwb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vj46ej" sourceRef="ScriptTask_1qd3uwb" targetRef="updateInfraRequest" />
+ <bpmn2:callActivity id="DecomposeService" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00h6hmd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17g05fd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0cdtchu" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1eu60rt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00h6hmd</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1eu60rt" sourceRef="IntermediateCatchEvent_3" targetRef="ScriptTask_0cdtchu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00h6hmd" sourceRef="ScriptTask_0cdtchu" targetRef="DecomposeService" />
+ <bpmn2:scriptTask id="ScriptTask_0vf9bei" name="Prepare to create Allotted Resources TXC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0x9pjgm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kgaq0j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_110rm9l" name="CreateAllottedResourcesTXC">
+ <bpmn2:outgoing>SequenceFlow_0x9pjgm</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0x9pjgm" sourceRef="IntermediateCatchEvent_110rm9l" targetRef="ScriptTask_0vf9bei" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1oudh6l" name="Create TXC AR?" default="SequenceFlow_0ofjahh">
+ <bpmn2:incoming>SequenceFlow_1kgaq0j</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ofjahh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16qob4p</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_074qh5g">
+ <bpmn2:incoming>SequenceFlow_0ofjahh</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1cgpklo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0o6tf9p</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ofjahh" name="No" sourceRef="ExclusiveGateway_1oudh6l" targetRef="ExclusiveGateway_074qh5g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kgaq0j" sourceRef="ScriptTask_0vf9bei" targetRef="ExclusiveGateway_1oudh6l" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16qob4p" name="Yes" sourceRef="ExclusiveGateway_1oudh6l" targetRef="CallActivity_1ymzucb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("createTXCAR") != null && execution.getVariable("createTXCAR") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1i1nwfx" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_15odbkz</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1as6hoa" name="GoToCreateAllottedResourcesTXC">
+ <bpmn2:incoming>SequenceFlow_1db0ri1</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15odbkz" sourceRef="IntermediateCatchEvent_1i1nwfx" targetRef="prepareCreateService_scriptTask" />
+ <bpmn2:callActivity id="Task_1l0uvof" name="Call Homing Service" camunda:modelerTemplate="homingBlock" calledElement="Homing">
+ <bpmn2:extensionElements>
+ <camunda:in source="true" target="isDebugLogEnabled" />
+ <camunda:in source="null" target="timeout" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="subscriberInfo" target="subscriberInfo" />
+ <camunda:in source="homingService" target="homingService" />
+ <camunda:in source="customerLocation" target="customerLocation" />
+ <camunda:in source="cloudOwner" target="cloudOwner" />
+ <camunda:in source="cloudRegionId" target="cloudRegionId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="homingModelIds" target="homingModelIds" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jbuf1t" sourceRef="Task_1l0uvof" targetRef="IntermediateThrowEvent_0prlju0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17g05fd" sourceRef="DecomposeService" targetRef="ScriptTask_0lpv2da" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_17pzn7m" name="CreateAllottedResourcesBRG">
+ <bpmn2:outgoing>SequenceFlow_15vce9o</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lt5ltv" name="GoToFinishProcess">
+ <bpmn2:incoming>SequenceFlow_0hwsm6n</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1xwfgxs" name="Create BRG AR?" default="SequenceFlow_0loks1u">
+ <bpmn2:incoming>SequenceFlow_0yecpl2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0loks1u</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0b5ztoe</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0jqgskx">
+ <bpmn2:incoming>SequenceFlow_0loks1u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0e9e6fo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0hwsm6n</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0hwsm6n" sourceRef="ExclusiveGateway_0jqgskx" targetRef="IntermediateThrowEvent_0lt5ltv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0loks1u" name="No" sourceRef="ExclusiveGateway_1xwfgxs" targetRef="ExclusiveGateway_0jqgskx" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0b5ztoe" name="Yes" sourceRef="ExclusiveGateway_1xwfgxs" targetRef="CallActivity_0xt1l8t">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("createBRGAR") != null && execution.getVariable("createBRGAR") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_05epj75" name="Prepare to create Allotted Resources BRG" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15vce9o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0yecpl2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareCreateAllottedResourceBRG(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15vce9o" sourceRef="IntermediateCatchEvent_17pzn7m" targetRef="ScriptTask_05epj75" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0yecpl2" sourceRef="ScriptTask_05epj75" targetRef="ExclusiveGateway_1xwfgxs" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_09vobbc" name="GoToCreateVG">
+ <bpmn2:incoming>SequenceFlow_0o6tf9p</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateVG" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0o6tf9p" sourceRef="ExclusiveGateway_074qh5g" targetRef="IntermediateThrowEvent_09vobbc" />
+ <bpmn2:callActivity id="CallActivity_1els13v" name="DoCreate&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="DCVAM_rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vnfId" target="vnfId" />
+ <camunda:out source="vnfName" target="vnfName" />
+ <camunda:out source="vnfOutputParams" target="vnfOutputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0n1k77c" name="Prepare to Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0p75l97</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ws7fjn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareVnfAndModulesCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1xsowxp" name="GoToCreateAllottedResourcesBRG">
+ <bpmn2:incoming>SequenceFlow_1ufio7c</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_19a50jz" name="CreateVG">
+ <bpmn2:outgoing>SequenceFlow_0aza7xq</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateVG" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0yae9sb" name="Create VNF?" default="SequenceFlow_13iuk3s">
+ <bpmn2:incoming>SequenceFlow_0aza7xq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0p75l97</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_13iuk3s</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1hlbkue">
+ <bpmn2:incoming>SequenceFlow_13iuk3s</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0k5vcuu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ufio7c</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ws7fjn" sourceRef="ScriptTask_0n1k77c" targetRef="CallActivity_1els13v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1mkdhw9" name="in 1702 scope only one VNF will be created - if needed" sourceRef="CallActivity_1els13v" targetRef="ScriptTask_18w0jud">
+ <bpmn2:documentation>in 1702 scope only one VNF will be created</bpmn2:documentation>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0p75l97" name="Yes" sourceRef="ExclusiveGateway_0yae9sb" targetRef="ScriptTask_0n1k77c">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVRCS_VNFsCount") >0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ufio7c" sourceRef="ExclusiveGateway_1hlbkue" targetRef="IntermediateThrowEvent_1xsowxp" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0aza7xq" sourceRef="IntermediateCatchEvent_19a50jz" targetRef="ExclusiveGateway_0yae9sb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13iuk3s" name="No" sourceRef="ExclusiveGateway_0yae9sb" targetRef="ExclusiveGateway_1hlbkue" />
+ <bpmn2:callActivity id="CallActivity_1ymzucb" name="Call Create TXC Allotted Resource&#10;" calledElement="DoCreateAllottedResourceTXC">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceIdTXC" target="parentServiceInstanceId" />
+ <camunda:in source="serviceChainServiceInstanceId" target="serviceChainServiceInstanceId" />
+ <camunda:in source="allottedResourceIdTXC" target="allottedResourceId" />
+ <camunda:in source="allottedResourceModelInfoTXC" target="allottedResourceModelInfo" />
+ <camunda:in source="allottedResourceRoleTXC" target="allottedResourceRole" />
+ <camunda:out source="rollbackData" target="DCARTXC_rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="allottedResourceId" target="DCARTXC_allottedResourceId" />
+ <camunda:out source="vni" target="vni" />
+ <camunda:out source="vgmuxBearerIP" target="vgmuxBearerIP" />
+ <camunda:out source="vgmuxLanIP" target="vgmuxLanIP" />
+ <camunda:in source="allottedResourceTypeTXC" target="allottedResourceType" />
+ <camunda:in source="brgWanMacAddress" target="brgWanMacAddress" />
+ <camunda:in source="globalCustomerId" target="globalCustomerId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16qob4p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cgpklo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cgpklo" sourceRef="CallActivity_1ymzucb" targetRef="ExclusiveGateway_074qh5g" />
+ <bpmn2:scriptTask id="ScriptTask_0lpv2da" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17g05fd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11efpvh</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.processDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11efpvh" sourceRef="ScriptTask_0lpv2da" targetRef="Task_1l0uvof" />
+ <bpmn2:scriptTask id="ScriptTask_18w0jud" name="Post Process Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1mkdhw9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k5vcuu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.validateVnfCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k5vcuu" sourceRef="ScriptTask_18w0jud" targetRef="ExclusiveGateway_1hlbkue" />
+ <bpmn2:callActivity id="CallActivity_0xt1l8t" name="Call Create BRG Allotted Resource&#10;" calledElement="DoCreateAllottedResourceBRG">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceIdBRG" target="parentServiceInstanceId" />
+ <camunda:in source="allottedResourceIdBRG" target="allottedResourceId" />
+ <camunda:in source="allottedResourceModelInfoBRG" target="allottedResourceModelInfo" />
+ <camunda:in source="allottedResourceRoleBRG" target="allottedResourceRole" />
+ <camunda:out source="rollbackData" target="DCARBRG_rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="allottedResourceId" target="DCARBRG_allottedResourceId" />
+ <camunda:out source="allottedResourceName" target="DCARBRG_allottedResourceName" />
+ <camunda:in source="allottedResourceTypeBRG" target="allottedResourceType" />
+ <camunda:in source="vni" target="vni" />
+ <camunda:in source="vgmuxBearerIP" target="vgmuxBearerIP" />
+ <camunda:in source="brgWanMacAddress" target="brgWanMacAddress" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalCustomerId" target="globalCustomerId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0b5ztoe</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0e9e6fo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0e9e6fo" sourceRef="CallActivity_0xt1l8t" targetRef="ExclusiveGateway_0jqgskx" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1x88t9v" name="Await AAI Distribution&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_0sjpja4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1db0ri1</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${aaiDistDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sjpja4" sourceRef="updateInfraRequest" targetRef="IntermediateCatchEvent_1x88t9v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1db0ri1" sourceRef="IntermediateCatchEvent_1x88t9v" targetRef="IntermediateThrowEvent_1as6hoa" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVcpeResCustService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVCPE_startEvent">
+ <dc:Bounds x="87" y="215" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="256" width="51" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="276" y="193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="123" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="276" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="233" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="763" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="490" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="376" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="265" y="194" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="467" y="193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="590" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVCPE_EndEvent">
+ <dc:Bounds x="1262" y="1452" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1269" y="1493" width="21" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337">
+ <di:waypoint xsi:type="dc:Point" x="863" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="1471" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="967" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="1257" y="1702" width="409" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="1325" y="1807" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1343" y="1848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="1400" y="1785" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1553" y="1807" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1571" y="1848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="1361" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1400" y="1825" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1389" y="1825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="1500" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1533" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1533" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1553" y="1825" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1548" y="1825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="456" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="567" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="719" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="643" y="218" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1071" y="1431" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="1171" y="1470" />
+ <di:waypoint xsi:type="dc:Point" x="1262" y="1470" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1217" y="1455" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="87" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="406" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="60" y="1454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="1490" width="78" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="719" y="215" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="697" y="256" width="79" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="-266" y="1649" width="1482" height="1528" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2971" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="3031" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="-63" y="2979" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-69" y="3020" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2888" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-15" y="2903" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true">
+ <dc:Bounds x="177" y="1821" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="110" y="1815" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="1023" y="2945" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="1160" y="2967" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1133" y="3008" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="891" y="2945" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2971" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2938" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="81" y="2958" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2938" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="3001" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="2913" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="419" y="2917" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2888" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2866" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="86" y="2871" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt">
+ <di:waypoint xsi:type="dc:Point" x="202" y="1821" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="1725" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="1725" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="1941" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="1704" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gacz45_di" bpmnElement="prepareCreateService_scriptTask">
+ <dc:Bounds x="250" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask">
+ <dc:Bounds x="204" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="96" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="150" y="1447" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg">
+ <di:waypoint xsi:type="dc:Point" x="304" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="490" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="376" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity">
+ <dc:Bounds x="976" y="1926" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso">
+ <dc:Bounds x="709" y="2888" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2943" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2006" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2103" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="996" y="2055" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm">
+ <di:waypoint xsi:type="dc:Point" x="759" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="2945" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="805" y="2898" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="991" y="2985" />
+ <di:waypoint xsi:type="dc:Point" x="1023" y="2985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="962" y="2970" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="2985" />
+ <di:waypoint xsi:type="dc:Point" x="1160" y="2985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1097" y="2970" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="1056" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1025" y="411" width="97" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j6sjye_di" bpmnElement="SequenceFlow_0j6sjye">
+ <di:waypoint xsi:type="dc:Point" x="350" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="456" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="403" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true">
+ <dc:Bounds x="656" y="1941" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="718" y="1923" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq">
+ <di:waypoint xsi:type="dc:Point" x="681" y="1991" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2045" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_16yhzej_di" bpmnElement="updateInfraRequest">
+ <dc:Bounds x="794" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
+ <dc:Bounds x="623" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ky2sv9_di" bpmnElement="SequenceFlow_1ky2sv9">
+ <di:waypoint xsi:type="dc:Point" x="556" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vj46ej_di" bpmnElement="SequenceFlow_0vj46ej">
+ <di:waypoint xsi:type="dc:Point" x="723" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="794" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="759" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz">
+ <dc:Bounds x="25" y="2786" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q">
+ <di:waypoint xsi:type="dc:Point" x="-27" y="2997" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="2997" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="50" y="2996" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-56" y="2998" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka">
+ <dc:Bounds x="1001" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="981" y="2158" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x">
+ <dc:Bounds x="684" y="2786" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0">
+ <di:waypoint xsi:type="dc:Point" x="734" y="2866" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2888" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="704" y="2877" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0w2alah_di" bpmnElement="DecomposeService">
+ <dc:Bounds x="467" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0cdtchu_di" bpmnElement="ScriptTask_0cdtchu">
+ <dc:Bounds x="276" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eu60rt_di" bpmnElement="SequenceFlow_1eu60rt">
+ <di:waypoint xsi:type="dc:Point" x="123" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="276" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="200" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00h6hmd_di" bpmnElement="SequenceFlow_00h6hmd">
+ <di:waypoint xsi:type="dc:Point" x="376" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="422" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0vf9bei_di" bpmnElement="ScriptTask_0vf9bei">
+ <dc:Bounds x="184" y="801" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_110rm9l_di" bpmnElement="IntermediateCatchEvent_110rm9l">
+ <dc:Bounds x="83" y="823" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="859" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x9pjgm_di" bpmnElement="SequenceFlow_0x9pjgm">
+ <di:waypoint xsi:type="dc:Point" x="119" y="841" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="826" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06gq6em_di" bpmnElement="ExclusiveGateway_06gq6em" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2603" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-37" y="2618" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1bpuf2p_di" bpmnElement="CallActivity_1bpuf2p">
+ <dc:Bounds x="152" y="2518" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_131ozdf_di" bpmnElement="InclusiveGateway_131ozdf">
+ <dc:Bounds x="50" y="2431" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="30" y="2486" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0orpdrl_di" bpmnElement="SequenceFlow_0orpdrl">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2628" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2628" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2598" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="141" y="2613" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t3cnnx_di" bpmnElement="SequenceFlow_1t3cnnx">
+ <di:waypoint xsi:type="dc:Point" x="202" y="2518" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="2500" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ya1cr3_di" bpmnElement="SequenceFlow_0ya1cr3">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2603" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2542" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2542" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="2508" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1oudh6l_di" bpmnElement="ExclusiveGateway_1oudh6l" isMarkerVisible="true">
+ <dc:Bounds x="332" y="816" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="399" y="829" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_074qh5g_di" bpmnElement="ExclusiveGateway_074qh5g" isMarkerVisible="true">
+ <dc:Bounds x="512" y="796" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="492" y="846" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ofjahh_di" bpmnElement="SequenceFlow_0ofjahh">
+ <di:waypoint xsi:type="dc:Point" x="357" y="866" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="901" />
+ <di:waypoint xsi:type="dc:Point" x="537" y="901" />
+ <di:waypoint xsi:type="dc:Point" x="537" y="846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="441" y="886" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kgaq0j_di" bpmnElement="SequenceFlow_1kgaq0j">
+ <di:waypoint xsi:type="dc:Point" x="284" y="841" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="263" y="826" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16qob4p_di" bpmnElement="SequenceFlow_16qob4p">
+ <di:waypoint xsi:type="dc:Point" x="357" y="816" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="730" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362" y="763" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_14tl857_di" bpmnElement="ExclusiveGateway_14tl857" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2282" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-24" y="2297" width="57" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_142br6v_di" bpmnElement="InclusiveGateway_142br6v">
+ <dc:Bounds x="50" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="30" y="2158" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kpdu1j_di" bpmnElement="SequenceFlow_1kpdu1j">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2282" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="83" y="2218" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mjdcct_di" bpmnElement="ExclusiveGateway_1mjdcct" isMarkerVisible="true">
+ <dc:Bounds x="177" y="2431" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178" y="2393" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sim44y_di" bpmnElement="SequenceFlow_1sim44y">
+ <di:waypoint xsi:type="dc:Point" x="177" y="2456" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="2456" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="2431" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dr2fem_di" bpmnElement="SequenceFlow_0dr2fem">
+ <di:waypoint xsi:type="dc:Point" x="226" y="2457" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2457" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2695" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="316" y="2436" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05dg1m1_di" bpmnElement="ExclusiveGateway_05dg1m1" isMarkerVisible="true">
+ <dc:Bounds x="177" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178" y="2064" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1quvahv_di" bpmnElement="SequenceFlow_1quvahv">
+ <di:waypoint xsi:type="dc:Point" x="177" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="2103" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mbymcu_di" bpmnElement="SequenceFlow_1mbymcu">
+ <di:waypoint xsi:type="dc:Point" x="227" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="2097" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1i1nwfx_di" bpmnElement="IntermediateCatchEvent_1i1nwfx">
+ <dc:Bounds x="87" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="601" width="65" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1as6hoa_di" bpmnElement="IntermediateThrowEvent_1as6hoa">
+ <dc:Bounds x="1027" y="666" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1002" y="707" width="85" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15odbkz_di" bpmnElement="SequenceFlow_15odbkz">
+ <di:waypoint xsi:type="dc:Point" x="123" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="250" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="187" y="558" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_07nu6s6_di" bpmnElement="Task_1l0uvof">
+ <dc:Bounds x="856" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jbuf1t_di" bpmnElement="SequenceFlow_1jbuf1t">
+ <di:waypoint xsi:type="dc:Point" x="956" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="1056" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="961" y="373" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17g05fd_di" bpmnElement="SequenceFlow_17g05fd">
+ <di:waypoint xsi:type="dc:Point" x="567" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="567.5" y="373" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y7gtd9_di" bpmnElement="ExclusiveGateway_0y7gtd9" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2695" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-39" y="2708" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ftzjjm_di" bpmnElement="SequenceFlow_0ftzjjm">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2786" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="2766" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12dakwh_di" bpmnElement="SequenceFlow_12dakwh">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2695" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2653" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="83" y="2666" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_1xenadu_di" bpmnElement="InclusiveGateway_1xenadu">
+ <dc:Bounds x="709" y="2695" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2750" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lv5ld6_di" bpmnElement="SequenceFlow_1lv5ld6">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2153" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="2720" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="996" y="2437" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dvsqpp_di" bpmnElement="SequenceFlow_0dvsqpp">
+ <di:waypoint xsi:type="dc:Point" x="734" y="2745" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2786" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="704" y="2766" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09nn9a9_di" bpmnElement="SequenceFlow_09nn9a9">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="2720" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="144" y="2693" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_027lz43_di" bpmnElement="SequenceFlow_027lz43">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2431" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="2372" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t3mtod_di" bpmnElement="SequenceFlow_0t3mtod">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2103" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="177" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="1965" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_17pzn7m_di" bpmnElement="IntermediateCatchEvent_17pzn7m">
+ <dc:Bounds x="83" y="1259" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="1295" width="80" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0lt5ltv_di" bpmnElement="IntermediateThrowEvent_0lt5ltv">
+ <dc:Bounds x="670" y="1274" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="1321" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1xwfgxs_di" bpmnElement="ExclusiveGateway_1xwfgxs" isMarkerVisible="true">
+ <dc:Bounds x="312" y="1252" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="369" y="1271" width="70" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0jqgskx_di" bpmnElement="ExclusiveGateway_0jqgskx" isMarkerVisible="true">
+ <dc:Bounds x="535" y="1267" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="1317" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hwsm6n_di" bpmnElement="SequenceFlow_0hwsm6n">
+ <di:waypoint xsi:type="dc:Point" x="585" y="1292" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="1292" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="1292" />
+ <di:waypoint xsi:type="dc:Point" x="670" y="1292" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="1292" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0loks1u_di" bpmnElement="SequenceFlow_0loks1u">
+ <di:waypoint xsi:type="dc:Point" x="337" y="1302" />
+ <di:waypoint xsi:type="dc:Point" x="337" y="1352" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1352" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1317" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="441" y="1337" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b5ztoe_di" bpmnElement="SequenceFlow_0b5ztoe">
+ <di:waypoint xsi:type="dc:Point" x="337" y="1252" />
+ <di:waypoint xsi:type="dc:Point" x="337" y="1191" />
+ <di:waypoint xsi:type="dc:Point" x="395" y="1191" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="354" y="1216" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_05epj75_di" bpmnElement="ScriptTask_05epj75">
+ <dc:Bounds x="184" y="1237" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15vce9o_di" bpmnElement="SequenceFlow_15vce9o">
+ <di:waypoint xsi:type="dc:Point" x="119" y="1277" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="1277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151.5" y="1256" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yecpl2_di" bpmnElement="SequenceFlow_0yecpl2">
+ <di:waypoint xsi:type="dc:Point" x="284" y="1277" />
+ <di:waypoint xsi:type="dc:Point" x="312" y="1277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="298" y="1256" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_09vobbc_di" bpmnElement="IntermediateThrowEvent_09vobbc">
+ <dc:Bounds x="670" y="803" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="844" width="85" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o6tf9p_di" bpmnElement="SequenceFlow_0o6tf9p">
+ <di:waypoint xsi:type="dc:Point" x="562" y="821" />
+ <di:waypoint xsi:type="dc:Point" x="670" y="821" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="616" y="800" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1els13v_di" bpmnElement="CallActivity_1els13v">
+ <dc:Bounds x="586" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0n1k77c_di" bpmnElement="ScriptTask_0n1k77c">
+ <dc:Bounds x="413" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1xsowxp_di" bpmnElement="IntermediateThrowEvent_1xsowxp">
+ <dc:Bounds x="1027" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1001" y="1072" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_19a50jz_di" bpmnElement="IntermediateCatchEvent_19a50jz">
+ <dc:Bounds x="77" y="1047" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="70" y="1083" width="48" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0yae9sb_di" bpmnElement="ExclusiveGateway_0yae9sb" isMarkerVisible="true">
+ <dc:Bounds x="326" y="1040" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1059" width="67" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hlbkue_di" bpmnElement="ExclusiveGateway_1hlbkue" isMarkerVisible="true">
+ <dc:Bounds x="892" y="1024" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872" y="1079" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ws7fjn_di" bpmnElement="SequenceFlow_0ws7fjn">
+ <di:waypoint xsi:type="dc:Point" x="513" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504.5" y="961" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mkdhw9_di" bpmnElement="SequenceFlow_1mkdhw9">
+ <di:waypoint xsi:type="dc:Point" x="686" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888.7571646117599" y="923.4934735403681" width="84" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p75l97_di" bpmnElement="SequenceFlow_0p75l97">
+ <di:waypoint xsi:type="dc:Point" x="351" y="1040" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362" y="1015" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ufio7c_di" bpmnElement="SequenceFlow_1ufio7c">
+ <di:waypoint xsi:type="dc:Point" x="942" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="1049" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="940.5" y="1024" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aza7xq_di" bpmnElement="SequenceFlow_0aza7xq">
+ <di:waypoint xsi:type="dc:Point" x="113" y="1065" />
+ <di:waypoint xsi:type="dc:Point" x="326" y="1065" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="175.5" y="1040" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13iuk3s_di" bpmnElement="SequenceFlow_13iuk3s">
+ <di:waypoint xsi:type="dc:Point" x="351" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1075" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="596" y="1090" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_071yaf8_di" bpmnElement="CallActivity_071yaf8">
+ <dc:Bounds x="321" y="1806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sl79hn_di" bpmnElement="SequenceFlow_1sl79hn">
+ <di:waypoint xsi:type="dc:Point" x="227" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="321" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="1826" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y158bb_di" bpmnElement="ExclusiveGateway_0y158bb" isMarkerVisible="true">
+ <dc:Bounds x="521" y="1821" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="522" y="1782" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ne9n0g_di" bpmnElement="SequenceFlow_0ne9n0g">
+ <di:waypoint xsi:type="dc:Point" x="421" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="1825" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a7e8l1_di" bpmnElement="SequenceFlow_1a7e8l1">
+ <di:waypoint xsi:type="dc:Point" x="706" y="1966" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="1966" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="1945" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00by7l7_di" bpmnElement="SequenceFlow_00by7l7">
+ <di:waypoint xsi:type="dc:Point" x="546" y="1871" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="554" y="1994" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17cz98f_di" bpmnElement="SequenceFlow_17cz98f">
+ <di:waypoint xsi:type="dc:Point" x="559" y="1858" />
+ <di:waypoint xsi:type="dc:Point" x="668" y="1954" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="614.8182269768699" y="1888.8734385586085" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1cl4iu4_di" bpmnElement="CallActivity_1cl4iu4">
+ <dc:Bounds x="152" y="2193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mpsdaj_di" bpmnElement="SequenceFlow_1mpsdaj">
+ <di:waypoint xsi:type="dc:Point" x="202" y="2193" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="2167" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_007p8k3_di" bpmnElement="SequenceFlow_007p8k3">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2307" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2307" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="142" y="2286" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1ymzucb_di" bpmnElement="CallActivity_1ymzucb">
+ <dc:Bounds x="400" y="690" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cgpklo_di" bpmnElement="SequenceFlow_1cgpklo">
+ <di:waypoint xsi:type="dc:Point" x="500" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="797" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="474" y="715" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lpv2da_di" bpmnElement="ScriptTask_0lpv2da">
+ <dc:Bounds x="658" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11efpvh_di" bpmnElement="SequenceFlow_11efpvh">
+ <di:waypoint xsi:type="dc:Point" x="758" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="856" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="807" y="367" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_18w0jud_di" bpmnElement="ScriptTask_18w0jud">
+ <dc:Bounds x="749" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k5vcuu_di" bpmnElement="SequenceFlow_0k5vcuu">
+ <di:waypoint xsi:type="dc:Point" x="849" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1024" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="961" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0xt1l8t_di" bpmnElement="CallActivity_0xt1l8t">
+ <dc:Bounds x="400" y="1151" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e9e6fo_di" bpmnElement="SequenceFlow_0e9e6fo">
+ <di:waypoint xsi:type="dc:Point" x="500" y="1191" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1191" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="1166" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1x88t9v_di" bpmnElement="IntermediateCatchEvent_1x88t9v">
+ <dc:Bounds x="1027" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1018" y="530" width="54" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sjpja4_di" bpmnElement="SequenceFlow_0sjpja4">
+ <di:waypoint xsi:type="dc:Point" x="894" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960.5" y="562" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1db0ri1_di" bpmnElement="SequenceFlow_1db0ri1">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="601" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="666" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1060" y="627.5" 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/process/CreateVcpeResCustServiceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
new file mode 100644
index 0000000000..06c517c12d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
@@ -0,0 +1,1443 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateVcpeResCustServiceV2" name="CreateVcpeResCustServiceV2" isExecutable="true">
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVCPE_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVCPE_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vCPE-RESCUST">
+ <bpmn2:outgoing>SequenceFlow_1eu60rt</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vCPE-RESCUST" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0afe2pg</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="CVRCS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("CreateVcpeResCustServiceSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVCPE_EndEvent" />
+ <bpmn2:endEvent id="CreateVCPE_EndEvent" name="End">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="Call Create &#10;ServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rollbackData" target="DCRESI_rollbackData" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="bpmnRequest" target="requestJson" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j6sjye</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ky2sv9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovCPE-RESCUST">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vCPE-RESCUST" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler" triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1vwgs6p" name="Is Rollback On?" default="SequenceFlow_0dhf2js">
+ <bpmn2:incoming>SequenceFlow_0zq7i3q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zpbskl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dhf2js</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_0zq7i3q</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ydrtdx" name="isPONR?" default="SequenceFlow_02o4yqx">
+ <bpmn2:incoming>SequenceFlow_0zpbskl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sx5llu</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_02o4yqx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="is AR_TXC Ok?" default="SequenceFlow_19mxskt">
+ <bpmn2:incoming>SequenceFlow_0t3mtod</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1sl79hn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVRCS_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_04xute7">
+ <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jg47xm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zpbskl" name="Yes" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="ExclusiveGateway_0ydrtdx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback") != true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dhf2js" name="No" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="InclusiveGateway_0foywso" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1sx5llu" name="Yes" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="InclusiveGateway_0foywso">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_02o4yqx" name="No" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="ScriptTask_17doerz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:callActivity id="DoRollbackService_CallActivity" name="DoRollback&#10;Service&#10;" calledElement="DoCreateServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCRESI_rollbackData" target="rollbackData" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rolledBack" target="DCRESI_rolledBack" />
+ <camunda:out source="rollbackError" target="DCRESI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1a7e8l1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f1hd3l</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0foywso">
+ <bpmn2:incoming>SequenceFlow_1sx5llu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dhf2js</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rabks0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0jg47xm</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0jg47xm" sourceRef="InclusiveGateway_0foywso" targetRef="ScriptTask_0yk02h3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq">
+ <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17cz98f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1a7e8l1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sezboq" name="No" sourceRef="ExclusiveGateway_05indeh" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zq7i3q" name="" sourceRef="StartEvent_1bwmffk" targetRef="ExclusiveGateway_1vwgs6p" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_0m9f5ka">
+ <bpmn2:incoming>SequenceFlow_1f1hd3l</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mbymcu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_00by7l7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lv5ld6</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ftzjjm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0dvsqpp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_06gq6em" name="is AR_BRG Ok?" default="SequenceFlow_0ya1cr3">
+ <bpmn2:incoming>SequenceFlow_12dakwh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0orpdrl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ya1cr3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_1bpuf2p" name="DoRollback&#10;BRG Allotted Resources&#10;" calledElement="DoCreateAllottedResourceBRGRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCARBRG_rollbackData" target="rollbackData" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rolledBack" target="DCARBRG_rolledBack" />
+ <camunda:out source="rollbackError" target="DCARBRG_rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0orpdrl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t3cnnx</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_131ozdf">
+ <bpmn2:incoming>SequenceFlow_0ya1cr3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1sim44y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_027lz43</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0orpdrl" name="Yes" sourceRef="ExclusiveGateway_06gq6em" targetRef="CallActivity_1bpuf2p">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARBRG_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1t3cnnx" sourceRef="CallActivity_1bpuf2p" targetRef="ExclusiveGateway_1mjdcct" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ya1cr3" name="No" sourceRef="ExclusiveGateway_06gq6em" targetRef="InclusiveGateway_131ozdf" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_14tl857" name="is VNF Ok?" default="SequenceFlow_1kpdu1j">
+ <bpmn2:incoming>SequenceFlow_027lz43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kpdu1j</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_007p8k3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_142br6v">
+ <bpmn2:incoming>SequenceFlow_1kpdu1j</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1quvahv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t3mtod</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kpdu1j" name="No" sourceRef="ExclusiveGateway_14tl857" targetRef="InclusiveGateway_142br6v" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1mjdcct" name="Rollback success?" default="SequenceFlow_0dr2fem">
+ <bpmn2:incoming>SequenceFlow_1t3cnnx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sim44y</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dr2fem</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sim44y" name="Yes" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_131ozdf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARBRG_rolledBack") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dr2fem" name="No" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_1xenadu" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05dg1m1" name="Rollback success?" default="SequenceFlow_1mbymcu">
+ <bpmn2:incoming>SequenceFlow_1mpsdaj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1quvahv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1mbymcu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1quvahv" name="Yes" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_142br6v">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rolledBack") ==true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mbymcu" name="No" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y7gtd9" name="rollback failed?" default="SequenceFlow_12dakwh">
+ <bpmn2:incoming>SequenceFlow_0ftzjjm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12dakwh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_09nn9a9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ftzjjm" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_0y7gtd9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12dakwh" name="No" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="ExclusiveGateway_06gq6em" />
+ <bpmn2:inclusiveGateway id="InclusiveGateway_1xenadu">
+ <bpmn2:incoming>SequenceFlow_1lv5ld6</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09nn9a9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dr2fem</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0dvsqpp</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lv5ld6" sourceRef="InclusiveGateway_0m9f5ka" targetRef="InclusiveGateway_1xenadu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0dvsqpp" sourceRef="InclusiveGateway_1xenadu" targetRef="ScriptTask_0wyub4x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_09nn9a9" name="Yes" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="InclusiveGateway_1xenadu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rolledBack") != null && execution.getVariable("rolledBack") == false}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_027lz43" sourceRef="InclusiveGateway_131ozdf" targetRef="ExclusiveGateway_14tl857" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t3mtod" sourceRef="InclusiveGateway_142br6v" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:callActivity id="CallActivity_071yaf8" name="DoRollback&#10;TXC Allotted Resources&#10;" calledElement="DoCreateAllottedResourceTXCRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCARTXC_rollbackData" target="rollbackData" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rolledBack" target="DCARTXC_rolledBack" />
+ <camunda:out source="rollbackError" target="DCARTXC_rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1sl79hn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ne9n0g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sl79hn" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="CallActivity_071yaf8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARTXC_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y158bb" name="Rollback success?" default="SequenceFlow_00by7l7">
+ <bpmn2:incoming>SequenceFlow_0ne9n0g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00by7l7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17cz98f</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ne9n0g" sourceRef="CallActivity_071yaf8" targetRef="ExclusiveGateway_0y158bb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a7e8l1" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="DoRollbackService_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_00by7l7" name="No" sourceRef="ExclusiveGateway_0y158bb" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17cz98f" name="Yes" sourceRef="ExclusiveGateway_0y158bb" targetRef="ExclusiveGateway_05indeh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARTXC_rolledBack") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="CallActivity_1cl4iu4" name="DoRollback&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModulesRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCVAM_rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="DCVAM_rolledBack" />
+ <camunda:out source="rollbackError" target="DCVAM_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_007p8k3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mpsdaj</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mpsdaj" sourceRef="CallActivity_1cl4iu4" targetRef="ExclusiveGateway_05dg1m1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_007p8k3" name="Yes" sourceRef="ExclusiveGateway_14tl857" targetRef="CallActivity_1cl4iu4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAM_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="prepareCreateService_scriptTask" name="Prepare&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15odbkz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j6sjye</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareCreateServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR">
+ <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartService">
+ <bpmn2:incoming>SequenceFlow_1jbuf1t</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0j6sjye" sourceRef="prepareCreateService_scriptTask" targetRef="doCreateServiceInstance_CallActivity" />
+ <bpmn2:serviceTask id="updateInfraRequest" name="Update DB status to SUCCESS">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CVRCS_setUpdateDbInstancePayload")}]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0vj46ej</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sjpja4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="Post Process&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.postProcessServiceInstanceCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ky2sv9" sourceRef="doCreateServiceInstance_CallActivity" targetRef="ScriptTask_1qd3uwb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vj46ej" sourceRef="ScriptTask_1qd3uwb" targetRef="updateInfraRequest" />
+ <bpmn2:callActivity id="DecomposeService" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00h6hmd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17g05fd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0cdtchu" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1eu60rt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00h6hmd</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1eu60rt" sourceRef="IntermediateCatchEvent_3" targetRef="ScriptTask_0cdtchu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00h6hmd" sourceRef="ScriptTask_0cdtchu" targetRef="DecomposeService" />
+ <bpmn2:scriptTask id="ScriptTask_0vf9bei" name="Prepare to create Allotted Resources TXC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0x9pjgm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kgaq0j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_110rm9l" name="CreateAllottedResourcesTXC">
+ <bpmn2:outgoing>SequenceFlow_0x9pjgm</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0x9pjgm" sourceRef="IntermediateCatchEvent_110rm9l" targetRef="ScriptTask_0vf9bei" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1oudh6l" name="Create TXC AR?" default="SequenceFlow_0ofjahh">
+ <bpmn2:incoming>SequenceFlow_1kgaq0j</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ofjahh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16qob4p</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_074qh5g">
+ <bpmn2:incoming>SequenceFlow_0ofjahh</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1cgpklo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0o6tf9p</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ofjahh" name="No" sourceRef="ExclusiveGateway_1oudh6l" targetRef="ExclusiveGateway_074qh5g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kgaq0j" sourceRef="ScriptTask_0vf9bei" targetRef="ExclusiveGateway_1oudh6l" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16qob4p" name="Yes" sourceRef="ExclusiveGateway_1oudh6l" targetRef="CallActivity_1ymzucb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("createTXCAR") != null && execution.getVariable("createTXCAR") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1i1nwfx" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_15odbkz</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1as6hoa" name="GoToCreateAllottedResourcesTXC">
+ <bpmn2:incoming>SequenceFlow_1db0ri1</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15odbkz" sourceRef="IntermediateCatchEvent_1i1nwfx" targetRef="prepareCreateService_scriptTask" />
+ <bpmn2:callActivity id="Task_1l0uvof" name="Call Homing Service" camunda:modelerTemplate="homingBlock" calledElement="Homing">
+ <bpmn2:extensionElements>
+ <camunda:in source="true" target="isDebugLogEnabled" />
+ <camunda:in source="null" target="timeout" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="subscriberInfo" target="subscriberInfo" />
+ <camunda:in source="homingService" target="homingService" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jbuf1t" sourceRef="Task_1l0uvof" targetRef="IntermediateThrowEvent_0prlju0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17g05fd" sourceRef="DecomposeService" targetRef="ScriptTask_0lpv2da" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_17pzn7m" name="CreateAllottedResourcesBRG">
+ <bpmn2:outgoing>SequenceFlow_0gj4vud</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lt5ltv" name="GoToFinishProcess">
+ <bpmn2:incoming>SequenceFlow_0clhseq</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_09vobbc" name="GoToCreateVG">
+ <bpmn2:incoming>SequenceFlow_0o6tf9p</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateVG" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0o6tf9p" sourceRef="ExclusiveGateway_074qh5g" targetRef="IntermediateThrowEvent_09vobbc" />
+ <bpmn2:callActivity id="CallActivity_1els13v" name="DoCreate&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="DCVAM_rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vnfId" target="vnfId" />
+ <camunda:out source="vnfName" target="vnfName" />
+ <camunda:out source="vnfOutputParams" target="vnfOutputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0n1k77c" name="Prepare to Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0p75l97</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ws7fjn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.prepareVnfAndModulesCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1xsowxp" name="GoToCreateAllottedResourcesBRG">
+ <bpmn2:incoming>SequenceFlow_1ufio7c</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_19a50jz" name="CreateVG">
+ <bpmn2:outgoing>SequenceFlow_0aza7xq</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="CreateVG" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0yae9sb" name="Create VNF?" default="SequenceFlow_13iuk3s">
+ <bpmn2:incoming>SequenceFlow_0aza7xq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0p75l97</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_13iuk3s</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1hlbkue">
+ <bpmn2:incoming>SequenceFlow_13iuk3s</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0k5vcuu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ufio7c</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ws7fjn" sourceRef="ScriptTask_0n1k77c" targetRef="CallActivity_1els13v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1mkdhw9" name="in 1702 scope only one VNF will be created - if needed" sourceRef="CallActivity_1els13v" targetRef="ScriptTask_18w0jud">
+ <bpmn2:documentation>in 1702 scope only one VNF will be created</bpmn2:documentation>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0p75l97" name="Yes" sourceRef="ExclusiveGateway_0yae9sb" targetRef="ScriptTask_0n1k77c">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVRCS_VNFsCount") >0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ufio7c" sourceRef="ExclusiveGateway_1hlbkue" targetRef="IntermediateThrowEvent_1xsowxp" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0aza7xq" sourceRef="IntermediateCatchEvent_19a50jz" targetRef="ExclusiveGateway_0yae9sb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13iuk3s" name="No" sourceRef="ExclusiveGateway_0yae9sb" targetRef="ExclusiveGateway_1hlbkue" />
+ <bpmn2:callActivity id="CallActivity_1ymzucb" name="Call Create TXC Allotted Resource&#10;" calledElement="DoCreateAllottedResourceTXC">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceIdTXC" target="parentServiceInstanceId" />
+ <camunda:in source="serviceChainServiceInstanceId" target="serviceChainServiceInstanceId" />
+ <camunda:in source="allottedResourceIdTXC" target="allottedResourceId" />
+ <camunda:in source="allottedResourceModelInfoTXC" target="allottedResourceModelInfo" />
+ <camunda:in source="allottedResourceRoleTXC" target="allottedResourceRole" />
+ <camunda:out source="rollbackData" target="DCARTXC_rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="allottedResourceId" target="DCARTXC_allottedResourceId" />
+ <camunda:out source="vni" target="vni" />
+ <camunda:out source="vgmuxBearerIP" target="vgmuxBearerIP" />
+ <camunda:out source="vgmuxLanIP" target="vgmuxLanIP" />
+ <camunda:in source="allottedResourceTypeTXC" target="allottedResourceType" />
+ <camunda:in source="brgWanMacAddress" target="brgWanMacAddress" />
+ <camunda:in source="globalCustomerId" target="globalCustomerId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16qob4p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cgpklo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cgpklo" sourceRef="CallActivity_1ymzucb" targetRef="ExclusiveGateway_074qh5g" />
+ <bpmn2:scriptTask id="ScriptTask_0lpv2da" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17g05fd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11efpvh</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.processDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11efpvh" sourceRef="ScriptTask_0lpv2da" targetRef="Task_1l0uvof" />
+ <bpmn2:scriptTask id="ScriptTask_18w0jud" name="Post Process Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1mkdhw9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k5vcuu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService= new CreateVcpeResCustService()
+CreateVcpeResCustService.validateVnfCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k5vcuu" sourceRef="ScriptTask_18w0jud" targetRef="ExclusiveGateway_1hlbkue" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1x88t9v" name="Await AAI Distribution&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_0sjpja4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1db0ri1</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${aaiDistDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sjpja4" sourceRef="updateInfraRequest" targetRef="IntermediateCatchEvent_1x88t9v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1db0ri1" sourceRef="IntermediateCatchEvent_1x88t9v" targetRef="IntermediateThrowEvent_1as6hoa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0gj4vud" sourceRef="IntermediateCatchEvent_17pzn7m" targetRef="Task_14l19kv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0clhseq" sourceRef="Task_14l19kv" targetRef="IntermediateThrowEvent_0lt5ltv" />
+ <bpmn2:callActivity id="Task_14l19kv" name="Create And Activate Pnf Resource" calledElement="CreateAndActivatePnfResource">
+ <bpmn2:extensionElements>
+ <camunda:in source="timeoutForPnfEntryNotification" target="timeoutForPnfEntryNotification" />
+ <camunda:in source="correlationId" target="correlationId" />
+ <camunda:in businessKey="#{execution.processBusinessKey}" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0gj4vud</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0clhseq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVcpeResCustServiceV2">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVCPE_startEvent">
+ <dc:Bounds x="87" y="215" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="256" width="51" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="276" y="193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="123" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="276" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="233" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="763" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="490" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="376" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="265" y="194" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="467" y="193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="590" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVCPE_EndEvent">
+ <dc:Bounds x="1262" y="1452" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1269" y="1493" width="21" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337">
+ <di:waypoint xsi:type="dc:Point" x="863" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="1471" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="967" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="1257" y="1702" width="409" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="1325" y="1807" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1343" y="1848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="1400" y="1785" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1553" y="1807" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1571" y="1848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="1361" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1400" y="1825" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1389" y="1825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="1500" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1533" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1533" y="1825" />
+ <di:waypoint xsi:type="dc:Point" x="1553" y="1825" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1548" y="1825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="456" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="567" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="719" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="643" y="218" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1071" y="1431" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="1171" y="1470" />
+ <di:waypoint xsi:type="dc:Point" x="1262" y="1470" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1217" y="1455" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="87" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="406" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="60" y="1454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="1490" width="78" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="719" y="215" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="697" y="256" width="79" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="-266" y="1649" width="1482" height="1528" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2971" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="3031" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="-63" y="2979" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-69" y="3020" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2888" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-15" y="2903" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true">
+ <dc:Bounds x="177" y="1821" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="110" y="1815" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="1023" y="2945" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="1160" y="2967" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1133" y="3008" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="891" y="2945" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2971" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2938" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="81" y="2958" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2938" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="3001" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="2913" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="419" y="2917" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2888" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2866" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="86" y="2871" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt">
+ <di:waypoint xsi:type="dc:Point" x="202" y="1821" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="1725" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="1725" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="1941" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="1704" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gacz45_di" bpmnElement="prepareCreateService_scriptTask">
+ <dc:Bounds x="250" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask">
+ <dc:Bounds x="204" y="1432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="96" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="150" y="1447" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg">
+ <di:waypoint xsi:type="dc:Point" x="304" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="490" y="1472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="376" y="1457" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity">
+ <dc:Bounds x="976" y="1926" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso">
+ <dc:Bounds x="709" y="2888" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2943" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2006" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2103" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="996" y="2055" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm">
+ <di:waypoint xsi:type="dc:Point" x="759" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="2913" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="2945" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="805" y="2898" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="991" y="2985" />
+ <di:waypoint xsi:type="dc:Point" x="1023" y="2985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="962" y="2970" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="2985" />
+ <di:waypoint xsi:type="dc:Point" x="1160" y="2985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1097" y="2970" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="1056" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1025" y="411" width="97" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j6sjye_di" bpmnElement="SequenceFlow_0j6sjye">
+ <di:waypoint xsi:type="dc:Point" x="350" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="456" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="403" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true">
+ <dc:Bounds x="656" y="1941" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="718" y="1923" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq">
+ <di:waypoint xsi:type="dc:Point" x="681" y="1991" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2045" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_16yhzej_di" bpmnElement="updateInfraRequest">
+ <dc:Bounds x="794" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
+ <dc:Bounds x="623" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ky2sv9_di" bpmnElement="SequenceFlow_1ky2sv9">
+ <di:waypoint xsi:type="dc:Point" x="556" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vj46ej_di" bpmnElement="SequenceFlow_0vj46ej">
+ <di:waypoint xsi:type="dc:Point" x="723" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="794" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="759" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz">
+ <dc:Bounds x="25" y="2786" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q">
+ <di:waypoint xsi:type="dc:Point" x="-27" y="2997" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="2997" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="2996" />
+ <di:waypoint xsi:type="dc:Point" x="50" y="2996" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-56" y="2998" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka">
+ <dc:Bounds x="1001" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="981" y="2158" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x">
+ <dc:Bounds x="684" y="2786" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0">
+ <di:waypoint xsi:type="dc:Point" x="734" y="2866" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2888" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="704" y="2877" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0w2alah_di" bpmnElement="DecomposeService">
+ <dc:Bounds x="467" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0cdtchu_di" bpmnElement="ScriptTask_0cdtchu">
+ <dc:Bounds x="276" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eu60rt_di" bpmnElement="SequenceFlow_1eu60rt">
+ <di:waypoint xsi:type="dc:Point" x="123" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="276" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="200" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00h6hmd_di" bpmnElement="SequenceFlow_00h6hmd">
+ <di:waypoint xsi:type="dc:Point" x="376" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="422" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0vf9bei_di" bpmnElement="ScriptTask_0vf9bei">
+ <dc:Bounds x="184" y="801" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_110rm9l_di" bpmnElement="IntermediateCatchEvent_110rm9l">
+ <dc:Bounds x="83" y="823" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="859" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x9pjgm_di" bpmnElement="SequenceFlow_0x9pjgm">
+ <di:waypoint xsi:type="dc:Point" x="119" y="841" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="826" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06gq6em_di" bpmnElement="ExclusiveGateway_06gq6em" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2603" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-37" y="2618" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1bpuf2p_di" bpmnElement="CallActivity_1bpuf2p">
+ <dc:Bounds x="152" y="2518" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_131ozdf_di" bpmnElement="InclusiveGateway_131ozdf">
+ <dc:Bounds x="50" y="2431" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="30" y="2486" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0orpdrl_di" bpmnElement="SequenceFlow_0orpdrl">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2628" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2628" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2598" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="141" y="2613" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t3cnnx_di" bpmnElement="SequenceFlow_1t3cnnx">
+ <di:waypoint xsi:type="dc:Point" x="202" y="2518" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="2500" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ya1cr3_di" bpmnElement="SequenceFlow_0ya1cr3">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2603" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2542" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2542" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="2508" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1oudh6l_di" bpmnElement="ExclusiveGateway_1oudh6l" isMarkerVisible="true">
+ <dc:Bounds x="332" y="816" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="399" y="829" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_074qh5g_di" bpmnElement="ExclusiveGateway_074qh5g" isMarkerVisible="true">
+ <dc:Bounds x="512" y="796" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="492" y="846" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ofjahh_di" bpmnElement="SequenceFlow_0ofjahh">
+ <di:waypoint xsi:type="dc:Point" x="357" y="866" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="901" />
+ <di:waypoint xsi:type="dc:Point" x="537" y="901" />
+ <di:waypoint xsi:type="dc:Point" x="537" y="846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="441" y="886" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kgaq0j_di" bpmnElement="SequenceFlow_1kgaq0j">
+ <di:waypoint xsi:type="dc:Point" x="284" y="841" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="263" y="826" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16qob4p_di" bpmnElement="SequenceFlow_16qob4p">
+ <di:waypoint xsi:type="dc:Point" x="357" y="816" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="730" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362" y="763" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_14tl857_di" bpmnElement="ExclusiveGateway_14tl857" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2282" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-24" y="2297" width="57" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_142br6v_di" bpmnElement="InclusiveGateway_142br6v">
+ <dc:Bounds x="50" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="30" y="2158" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kpdu1j_di" bpmnElement="SequenceFlow_1kpdu1j">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2282" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="83" y="2218" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mjdcct_di" bpmnElement="ExclusiveGateway_1mjdcct" isMarkerVisible="true">
+ <dc:Bounds x="177" y="2431" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178" y="2393" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sim44y_di" bpmnElement="SequenceFlow_1sim44y">
+ <di:waypoint xsi:type="dc:Point" x="177" y="2456" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="2456" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="2431" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dr2fem_di" bpmnElement="SequenceFlow_0dr2fem">
+ <di:waypoint xsi:type="dc:Point" x="226" y="2457" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2457" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2695" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="316" y="2436" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05dg1m1_di" bpmnElement="ExclusiveGateway_05dg1m1" isMarkerVisible="true">
+ <dc:Bounds x="177" y="2103" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178" y="2064" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1quvahv_di" bpmnElement="SequenceFlow_1quvahv">
+ <di:waypoint xsi:type="dc:Point" x="177" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="2103" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mbymcu_di" bpmnElement="SequenceFlow_1mbymcu">
+ <di:waypoint xsi:type="dc:Point" x="227" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="2097" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1i1nwfx_di" bpmnElement="IntermediateCatchEvent_1i1nwfx">
+ <dc:Bounds x="87" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="601" width="65" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1as6hoa_di" bpmnElement="IntermediateThrowEvent_1as6hoa">
+ <dc:Bounds x="1027" y="666" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1002" y="707" width="85" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15odbkz_di" bpmnElement="SequenceFlow_15odbkz">
+ <di:waypoint xsi:type="dc:Point" x="123" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="250" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="187" y="558" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_07nu6s6_di" bpmnElement="Task_1l0uvof">
+ <dc:Bounds x="856" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jbuf1t_di" bpmnElement="SequenceFlow_1jbuf1t">
+ <di:waypoint xsi:type="dc:Point" x="956" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="1056" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="961" y="373" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17g05fd_di" bpmnElement="SequenceFlow_17g05fd">
+ <di:waypoint xsi:type="dc:Point" x="567" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="567.5" y="373" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y7gtd9_di" bpmnElement="ExclusiveGateway_0y7gtd9" isMarkerVisible="true">
+ <dc:Bounds x="50" y="2695" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-39" y="2708" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ftzjjm_di" bpmnElement="SequenceFlow_0ftzjjm">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2786" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="2766" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12dakwh_di" bpmnElement="SequenceFlow_12dakwh">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2695" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2653" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="83" y="2666" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_1xenadu_di" bpmnElement="InclusiveGateway_1xenadu">
+ <dc:Bounds x="709" y="2695" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="2750" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lv5ld6_di" bpmnElement="SequenceFlow_1lv5ld6">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2153" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="2720" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="996" y="2437" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dvsqpp_di" bpmnElement="SequenceFlow_0dvsqpp">
+ <di:waypoint xsi:type="dc:Point" x="734" y="2745" />
+ <di:waypoint xsi:type="dc:Point" x="734" y="2786" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="704" y="2766" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09nn9a9_di" bpmnElement="SequenceFlow_09nn9a9">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="2720" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="2720" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="144" y="2693" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_027lz43_di" bpmnElement="SequenceFlow_027lz43">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2431" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="2332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="2372" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t3mtod_di" bpmnElement="SequenceFlow_0t3mtod">
+ <di:waypoint xsi:type="dc:Point" x="75" y="2103" />
+ <di:waypoint xsi:type="dc:Point" x="75" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="177" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="1965" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_17pzn7m_di" bpmnElement="IntermediateCatchEvent_17pzn7m">
+ <dc:Bounds x="83" y="1259" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="1295" width="80" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0lt5ltv_di" bpmnElement="IntermediateThrowEvent_0lt5ltv">
+ <dc:Bounds x="670" y="1259" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645" y="1306" width="85" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_09vobbc_di" bpmnElement="IntermediateThrowEvent_09vobbc">
+ <dc:Bounds x="670" y="803" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="844" width="85" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o6tf9p_di" bpmnElement="SequenceFlow_0o6tf9p">
+ <di:waypoint xsi:type="dc:Point" x="562" y="821" />
+ <di:waypoint xsi:type="dc:Point" x="670" y="821" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="616" y="800" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1els13v_di" bpmnElement="CallActivity_1els13v">
+ <dc:Bounds x="586" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0n1k77c_di" bpmnElement="ScriptTask_0n1k77c">
+ <dc:Bounds x="413" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1xsowxp_di" bpmnElement="IntermediateThrowEvent_1xsowxp">
+ <dc:Bounds x="1027" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1001" y="1072" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_19a50jz_di" bpmnElement="IntermediateCatchEvent_19a50jz">
+ <dc:Bounds x="77" y="1047" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="70" y="1083" width="48" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0yae9sb_di" bpmnElement="ExclusiveGateway_0yae9sb" isMarkerVisible="true">
+ <dc:Bounds x="326" y="1040" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1059" width="67" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hlbkue_di" bpmnElement="ExclusiveGateway_1hlbkue" isMarkerVisible="true">
+ <dc:Bounds x="892" y="1024" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872" y="1079" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ws7fjn_di" bpmnElement="SequenceFlow_0ws7fjn">
+ <di:waypoint xsi:type="dc:Point" x="513" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504.5" y="961" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mkdhw9_di" bpmnElement="SequenceFlow_1mkdhw9">
+ <di:waypoint xsi:type="dc:Point" x="686" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888.7571646117599" y="923.4934735403681" width="84" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p75l97_di" bpmnElement="SequenceFlow_0p75l97">
+ <di:waypoint xsi:type="dc:Point" x="351" y="1040" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362" y="1015" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ufio7c_di" bpmnElement="SequenceFlow_1ufio7c">
+ <di:waypoint xsi:type="dc:Point" x="942" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="1049" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="940.5" y="1024" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aza7xq_di" bpmnElement="SequenceFlow_0aza7xq">
+ <di:waypoint xsi:type="dc:Point" x="113" y="1065" />
+ <di:waypoint xsi:type="dc:Point" x="326" y="1065" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="175.5" y="1040" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13iuk3s_di" bpmnElement="SequenceFlow_13iuk3s">
+ <di:waypoint xsi:type="dc:Point" x="351" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1075" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="596" y="1090" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_071yaf8_di" bpmnElement="CallActivity_071yaf8">
+ <dc:Bounds x="321" y="1806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sl79hn_di" bpmnElement="SequenceFlow_1sl79hn">
+ <di:waypoint xsi:type="dc:Point" x="227" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="321" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="1826" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y158bb_di" bpmnElement="ExclusiveGateway_0y158bb" isMarkerVisible="true">
+ <dc:Bounds x="521" y="1821" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="522" y="1782" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ne9n0g_di" bpmnElement="SequenceFlow_0ne9n0g">
+ <di:waypoint xsi:type="dc:Point" x="421" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="1825" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a7e8l1_di" bpmnElement="SequenceFlow_1a7e8l1">
+ <di:waypoint xsi:type="dc:Point" x="706" y="1966" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="1966" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="1945" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00by7l7_di" bpmnElement="SequenceFlow_00by7l7">
+ <di:waypoint xsi:type="dc:Point" x="546" y="1871" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="2128" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="2128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="554" y="1994" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17cz98f_di" bpmnElement="SequenceFlow_17cz98f">
+ <di:waypoint xsi:type="dc:Point" x="559" y="1858" />
+ <di:waypoint xsi:type="dc:Point" x="668" y="1954" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="614.8182269768699" y="1888.8734385586085" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1cl4iu4_di" bpmnElement="CallActivity_1cl4iu4">
+ <dc:Bounds x="152" y="2193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mpsdaj_di" bpmnElement="SequenceFlow_1mpsdaj">
+ <di:waypoint xsi:type="dc:Point" x="202" y="2193" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="2167" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_007p8k3_di" bpmnElement="SequenceFlow_007p8k3">
+ <di:waypoint xsi:type="dc:Point" x="100" y="2307" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2307" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="2273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="142" y="2286" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1ymzucb_di" bpmnElement="CallActivity_1ymzucb">
+ <dc:Bounds x="400" y="690" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cgpklo_di" bpmnElement="SequenceFlow_1cgpklo">
+ <di:waypoint xsi:type="dc:Point" x="500" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="730" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="797" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="474" y="715" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lpv2da_di" bpmnElement="ScriptTask_0lpv2da">
+ <dc:Bounds x="658" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11efpvh_di" bpmnElement="SequenceFlow_11efpvh">
+ <di:waypoint xsi:type="dc:Point" x="758" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="856" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="807" y="367" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_18w0jud_di" bpmnElement="ScriptTask_18w0jud">
+ <dc:Bounds x="749" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k5vcuu_di" bpmnElement="SequenceFlow_0k5vcuu">
+ <di:waypoint xsi:type="dc:Point" x="849" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="1024" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="961" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1x88t9v_di" bpmnElement="IntermediateCatchEvent_1x88t9v">
+ <dc:Bounds x="1027" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1018" y="530" width="54" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sjpja4_di" bpmnElement="SequenceFlow_0sjpja4">
+ <di:waypoint xsi:type="dc:Point" x="894" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="583" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960.5" y="562" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1db0ri1_di" bpmnElement="SequenceFlow_1db0ri1">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="601" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="666" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1060" y="627.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gj4vud_di" bpmnElement="SequenceFlow_0gj4vud">
+ <di:waypoint xsi:type="dc:Point" x="119" y="1277" />
+ <di:waypoint xsi:type="dc:Point" x="345" y="1277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="1257" width="0" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0clhseq_di" bpmnElement="SequenceFlow_0clhseq">
+ <di:waypoint xsi:type="dc:Point" x="445" y="1277" />
+ <di:waypoint xsi:type="dc:Point" x="670" y="1277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557.5" y="1257" width="0" height="10" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1totpg4_di" bpmnElement="Task_14l19kv">
+ <dc:Bounds x="345" y="1237" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleInfra.bpmn
new file mode 100644
index 0000000000..eefc2ca12c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleInfra.bpmn
@@ -0,0 +1,700 @@
+<?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="_pNTO8MRhEeWv36YLr7PC3Q" 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="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:callActivity id="DoCreateVfModuleSubprocess" name="Do Create Vf Module" calledElement="DoCreateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVFMI_requestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="DCVFM_vnfId" target="CVFMI_vnfId" />
+ <camunda:out source="DCVFM_vfModuleId" target="CVFMI_vfModuleId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="CVFMI_WorkflowResponse" />
+ <camunda:out source="DCVFM_vfModuleName" target="CVFMI_vfModuleName" />
+ <camunda:in source="CVFMI_vnfType" target="vnfType" />
+ <camunda:in source="CVFMI_vnfName" target="vnfName" />
+ <camunda:in source="CVFMI_vnfId" target="vnfId" />
+ <camunda:in source="CVFMI_vfModuleName" target="vfModuleName" />
+ <camunda:in source="CVFMI_vfModuleType" target="vfModuleType" />
+ <camunda:in source="CVFMI_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="CVFMI_volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="CVFMI_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="CVFMI_asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="CVFMI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="CVFMI_serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="CVFMI_vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="CVFMI_globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="CVFMI_sdncVersion" target="sdncVersion" />
+ <camunda:in source="CVFMI_lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="CVFMI_tenantId" target="tenantId" />
+ <camunda:in source="CVFMI_vfModuleId" target="vfModuleId" />
+ <camunda:in source="CVFMI_vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="CVFMI_usePreload" target="usePreload" />
+ <camunda:in source="CVFMI_vfModuleInputParams" target="vfModuleInputParams" />
+ <camunda:in source="CVFMI_aLaCarte" target="aLaCarte" />
+ <camunda:out source="DCVFM_getSDNCAdapterResponse" target="DCVFM_getSDNCAdapterResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1y7d5qk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1vx081s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="SendResponse" name="Send Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1efipx3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.sendResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To FinishLine">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_34" name="FinishLine" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DoCreateVfModuleSubprocess" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="FinishLine">
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_35" name="FinishLine" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="IntermediateCatchEvent_1" targetRef="PrepareUpdateInfraRequest" />
+ <bpmn2:scriptTask id="PrepareUpdateInfraRequest" name="Prepare Update Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVFMI_updateInfraRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1crl7uf</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1" />
+ <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0td7d9m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0u8zesf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PrepareMSOCompletionHandler" targetRef="MSOCompletionHandler" />
+ <bpmn2:callActivity id="MSOCompletionHandler" name="MSO Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVFMI_msoCompletionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="UpdateInfraRequestResponseCheck" name="Success? " default="updateInfraRequestResponseBad">
+ <bpmn2:incoming>SequenceFlow_1crl7uf</bpmn2:incoming>
+ <bpmn2:outgoing>updateInfraRequestResponseBad</bpmn2:outgoing>
+ <bpmn2:outgoing>updateInfraRequestResponseGood</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="updateInfraRequestResponseBad" name="no" sourceRef="UpdateInfraRequestResponseCheck" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="updateInfraRequestResponseGood" name="yes" sourceRef="UpdateInfraRequestResponseCheck" targetRef="ExclusiveGateway_0c8x2mq">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_dbResponseCode" ) == '200'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>updateInfraRequestResponseBad</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="ErrorHandler" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_2" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_0wsgnab</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:callActivity id="FalloutHandler" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVFMI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="FalloutHandler" targetRef="EndEvent_3" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="PrepareFalloutHandler" name="Prepare Fallout Handler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_018p5wf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def cvfm = new CreateVfModuleInfra()
+cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0wsgnab" sourceRef="StartEvent_2" targetRef="SendErrorResponse" />
+ <bpmn2:sequenceFlow id="SequenceFlow_018p5wf" sourceRef="SendErrorResponse" targetRef="PrepareFalloutHandler" />
+ <bpmn2:scriptTask id="SendErrorResponse" name="Send Error Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0wsgnab</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_018p5wf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.sendErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="SetSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[execution.setVariable("CreateVfModuleSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="MSOCompletionHandler" targetRef="SetSuccessIndicator" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="SetSuccessIndicator" targetRef="EndEvent_1" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="ErrorHandler">
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse" />
+ <bpmn2:subProcess id="SubProcess_0pgv3l6" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ProcessError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qvgrvq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jqizzo</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_0100eju">
+ <bpmn2:incoming>SequenceFlow_1jqizzo</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_1mov8he">
+ <bpmn2:outgoing>SequenceFlow_1qvgrvq</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qvgrvq" name="" sourceRef="StartEvent_1mov8he" targetRef="ProcessError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1jqizzo" name="" sourceRef="ProcessError" targetRef="EndEvent_0100eju" />
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="CallActivity_0i3men0" name="LCM HealthCheck" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="CVFMI_vnfId" target="vnfId" />
+ <camunda:in source="CVFMI_requestId" target="msoRequestId" />
+ <camunda:in source="CVFMI_vnfName" target="vnfName" />
+ <camunda:in source="CVFMI_controllerType" target="controllerType" />
+ <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1xggje5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_07llpjo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09h60ub" name="Error on HealthCheck?" default="SequenceFlow_1vx081s">
+ <bpmn2:incoming>SequenceFlow_07llpjo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1vx081s</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0nszq2o</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vx081s" name="no" sourceRef="ExclusiveGateway_09h60ub" targetRef="DoCreateVfModuleSubprocess" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07llpjo" sourceRef="CallActivity_0i3men0" targetRef="ExclusiveGateway_09h60ub" />
+ <bpmn2:endEvent id="EndEvent_0n6bb71">
+ <bpmn2:incoming>SequenceFlow_0nszq2o</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nszq2o" name="yes" sourceRef="ExclusiveGateway_09h60ub" targetRef="EndEvent_0n6bb71">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="CallActivity_17ukiqm" name="LCM ConfigScaleOut" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="actionConfigScaleOut" target="action" />
+ <camunda:in source="CVFMI_vnfId" target="vnfId" />
+ <camunda:in source="CVFMI_requestId" target="msoRequestId" />
+ <camunda:in source="CVFMI_vnfName" target="vnfName" />
+ <camunda:in source="CVFMI_controllerType" target="controllerType" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+ <camunda:out source="errorCode" target="errorConfigScaleOutCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="CVFMI_vfModuleId" target="vfModuleId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_09i6f7t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1tk5ru7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1crl7uf" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1hncvjy" name="Error on ConfigScaleOut?" default="SequenceFlow_0td7d9m">
+ <bpmn2:incoming>SequenceFlow_1tk5ru7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0td7d9m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0h5cld9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tk5ru7" sourceRef="CallActivity_17ukiqm" targetRef="ExclusiveGateway_1hncvjy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0td7d9m" name="no" sourceRef="ExclusiveGateway_1hncvjy" targetRef="PrepareMSOCompletionHandler" />
+ <bpmn2:endEvent id="EndEvent_0a97jcr">
+ <bpmn2:incoming>SequenceFlow_0h5cld9</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0h5cld9" name="yes" sourceRef="ExclusiveGateway_1hncvjy" targetRef="EndEvent_0a97jcr">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorConfigScaleOutCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1qozral" name="Do HealthCheck?" default="SequenceFlow_1y7d5qk">
+ <bpmn2:incoming>SequenceFlow_1hk35nm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xggje5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1y7d5qk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xggje5" name="yes" sourceRef="ExclusiveGateway_1qozral" targetRef="CallActivity_0i3men0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("runHealthCheck")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1y7d5qk" name="no" sourceRef="ExclusiveGateway_1qozral" targetRef="DoCreateVfModuleSubprocess" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0c8x2mq" name="Do ConfigScaleOut?" default="SequenceFlow_0u8zesf">
+ <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_020dbkp</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0u8zesf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_020dbkp" name="yes" sourceRef="ExclusiveGateway_0c8x2mq" targetRef="Task_09om99x">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("runConfigScaleOut")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u8zesf" name="no" sourceRef="ExclusiveGateway_0c8x2mq" targetRef="PrepareMSOCompletionHandler" />
+ <bpmn2:scriptTask id="ScriptTask_1jwavj9" name="Query AAI For Orchestration Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1efipx3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1hk35nm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.queryAAIForVnfOrchestrationStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_09i6f7t" sourceRef="Task_09om99x" targetRef="CallActivity_17ukiqm" />
+ <bpmn2:scriptTask id="Task_09om99x" name="Retreive Data for Config ScaleOut" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_020dbkp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_09i6f7t</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.retreiveConfigScaleOutData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1efipx3" sourceRef="SendResponse" targetRef="ScriptTask_1jwavj9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1hk35nm" sourceRef="ScriptTask_1jwavj9" targetRef="ExclusiveGateway_1qozral" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="REST Fault" errorCode="RESTFault" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="41" y="16" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="46" y="52" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="77" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="127" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="19" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="127" y="-6" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">
+ <dc:Bounds x="285" y="-6" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86">
+ <di:waypoint xsi:type="dc:Point" x="227" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="19" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">
+ <dc:Bounds x="736" y="-6" width="145" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="937" y="16" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="923" y="57" width="64" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_IntermediateThrowEvent_47">
+ <di:waypoint xsi:type="dc:Point" x="881" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="19" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="39" y="349" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="25" y="390" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest">
+ <dc:Bounds x="127" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1">
+ <dc:Bounds x="277" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">
+ <dc:Bounds x="406" y="342" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="320" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">
+ <dc:Bounds x="651" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">
+ <dc:Bounds x="789" y="327" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1078" y="349" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1051" y="390" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">
+ <dc:Bounds x="413" y="454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="495" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219">
+ <di:waypoint xsi:type="dc:Point" x="75" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="127" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="367" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ServiceTask_103">
+ <di:waypoint xsi:type="dc:Point" x="227" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="277" y="367" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="updateInfraRequestResponseBad" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_EndEvent_178">
+ <di:waypoint xsi:type="dc:Point" x="430" y="391" />
+ <di:waypoint xsi:type="dc:Point" x="431" y="454" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="436" y="420" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="ExclusiveGateway_0c8x2mq_di">
+ <di:waypoint xsi:type="dc:Point" x="456" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462.46376811594206" y="371.99999999999994" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_221">
+ <di:waypoint xsi:type="dc:Point" x="751" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="789" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="349" width="90" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">
+ <dc:Bounds x="30" y="566" width="925" height="385" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
+ <dc:Bounds x="139" y="720" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="137" y="762" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler">
+ <dc:Bounds x="497" y="698" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler">
+ <dc:Bounds x="690" y="698" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3">
+ <dc:Bounds x="846" y="720" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="761" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="937" y="716" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="955" y="757" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1066" y="716" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1084" y="757" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_222" targetElement="_BPMNShape_ScriptTask_223">
+ <di:waypoint xsi:type="dc:Point" x="597" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="690" y="738" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_223" targetElement="_BPMNShape_EndEvent_179">
+ <di:waypoint xsi:type="dc:Point" x="790" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="846" y="738" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="821" y="738" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_BoundaryEvent_44" targetElement="_BPMNShape_EndEvent_180">
+ <di:waypoint xsi:type="dc:Point" x="973" y="734" />
+ <di:waypoint xsi:type="dc:Point" x="1066" y="734" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1020" y="719" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">
+ <dc:Bounds x="946" y="327" width="103" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241">
+ <di:waypoint xsi:type="dc:Point" x="889" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="946" y="366" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="873" y="342" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="1049" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="1078" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1019" y="342" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0pgv3l6_di" bpmnElement="SubProcess_0pgv3l6" isExpanded="true">
+ <dc:Bounds x="160" y="1001" width="313" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_13ekvux_di" bpmnElement="ProcessError">
+ <dc:Bounds x="268" y="1047" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0100eju_di" bpmnElement="EndEvent_0100eju">
+ <dc:Bounds x="413" y="1069" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="1110" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1mov8he_di" bpmnElement="StartEvent_1mov8he">
+ <dc:Bounds x="185" y="1069" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="203" y="1110" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qvgrvq_di" bpmnElement="SequenceFlow_1qvgrvq">
+ <di:waypoint xsi:type="dc:Point" x="221" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="268" y="1087" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242" y="1087" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jqizzo_di" bpmnElement="SequenceFlow_1jqizzo">
+ <di:waypoint xsi:type="dc:Point" x="368" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="1087" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1087" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0wsgnab_di" bpmnElement="SequenceFlow_0wsgnab">
+ <di:waypoint xsi:type="dc:Point" x="175" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="235" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="235" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="296" y="738" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="250" y="738" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_018p5wf_di" bpmnElement="SequenceFlow_018p5wf">
+ <di:waypoint xsi:type="dc:Point" x="396" y="738" />
+ <di:waypoint xsi:type="dc:Point" x="497" y="738" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="447" y="723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_036ipyg_di" bpmnElement="SendErrorResponse">
+ <dc:Bounds x="296" y="698" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0i3men0_di" bpmnElement="CallActivity_0i3men0">
+ <dc:Bounds x="568" y="-145" width="145" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09h60ub_di" bpmnElement="ExclusiveGateway_09h60ub" isMarkerVisible="true">
+ <dc:Bounds x="784" y="-130" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="774" y="-162" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vx081s_di" bpmnElement="SequenceFlow_1vx081s">
+ <di:waypoint xsi:type="dc:Point" x="809" y="-80" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="-47" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="-6" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="815" y="-81.36842105263162" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07llpjo_di" bpmnElement="SequenceFlow_07llpjo">
+ <di:waypoint xsi:type="dc:Point" x="713" y="-105" />
+ <di:waypoint xsi:type="dc:Point" x="784" y="-105" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="703.5" y="-120" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0n6bb71_di" bpmnElement="EndEvent_0n6bb71">
+ <dc:Bounds x="937" y="-123" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="-82" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nszq2o_di" bpmnElement="SequenceFlow_0nszq2o">
+ <di:waypoint xsi:type="dc:Point" x="834" y="-105" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="-105" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850.3538461538461" y="-101" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_17ukiqm_di" bpmnElement="CallActivity_17ukiqm">
+ <dc:Bounds x="472" y="120" width="145" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1crl7uf_di" bpmnElement="SequenceFlow_1crl7uf">
+ <di:waypoint xsi:type="dc:Point" x="377" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="406" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391.5" y="346" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hncvjy_di" bpmnElement="ExclusiveGateway_1hncvjy" isMarkerVisible="true">
+ <dc:Bounds x="675" y="135" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="659" y="101" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tk5ru7_di" bpmnElement="SequenceFlow_1tk5ru7">
+ <di:waypoint xsi:type="dc:Point" x="617" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="675" y="160" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="601" y="139" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0td7d9m_di" bpmnElement="SequenceFlow_0td7d9m">
+ <di:waypoint xsi:type="dc:Point" x="700" y="185" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="327" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="708" y="122" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0a97jcr_di" bpmnElement="EndEvent_0a97jcr">
+ <dc:Bounds x="773" y="142" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="183" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h5cld9_di" bpmnElement="SequenceFlow_0h5cld9">
+ <di:waypoint xsi:type="dc:Point" x="725" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="773" y="160" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="730" y="166" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1qozral_di" bpmnElement="ExclusiveGateway_1qozral" isMarkerVisible="true">
+ <dc:Bounds x="616" y="9" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="599" y="66" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xggje5_di" bpmnElement="SequenceFlow_1xggje5">
+ <di:waypoint xsi:type="dc:Point" x="641" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="641" y="-28" />
+ <di:waypoint xsi:type="dc:Point" x="641" y="-28" />
+ <di:waypoint xsi:type="dc:Point" x="641" y="-65" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649" y="-1.7061403508771935" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1y7d5qk_di" bpmnElement="SequenceFlow_1y7d5qk">
+ <di:waypoint xsi:type="dc:Point" x="666" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="736" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685.0746268656717" y="37" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0c8x2mq_di" bpmnElement="ExclusiveGateway_0c8x2mq" isMarkerVisible="true">
+ <dc:Bounds x="520" y="342" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="402" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_020dbkp_di" bpmnElement="SequenceFlow_020dbkp">
+ <di:waypoint xsi:type="dc:Point" x="545" y="342" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="309" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="321.9537912405942" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u8zesf_di" bpmnElement="SequenceFlow_0u8zesf">
+ <di:waypoint xsi:type="dc:Point" x="570" y="367" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="367" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="372" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1jwavj9_di" bpmnElement="ScriptTask_1jwavj9">
+ <dc:Bounds x="454" y="-6" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09i6f7t_di" bpmnElement="SequenceFlow_09i6f7t">
+ <di:waypoint xsi:type="dc:Point" x="545" y="229" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="200" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="208.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1s0bky7_di" bpmnElement="Task_09om99x">
+ <dc:Bounds x="495" y="229" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1efipx3_di" bpmnElement="SequenceFlow_1efipx3">
+ <di:waypoint xsi:type="dc:Point" x="385" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="419.5" y="13" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hk35nm_di" bpmnElement="SequenceFlow_1hk35nm">
+ <di:waypoint xsi:type="dc:Point" x="554" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="616" y="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="13" 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/process/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000000..dcdcdc9d26
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,514 @@
+<?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="_CyftwG_HEeaKe-v4u9MasA" 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="CreateVfModuleVolumeInfraV1" name="CreateVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_createVfModuleVolumeInfraV1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_createVfModuleVolumeInfraV1" targetRef="ScriptTask_preProcessRequest" />
+ <bpmn2:subProcess id="SubProcess_exceptionHandler" name="Exception Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_catchErrors" name="Catch Exceptions">
+ <bpmn2:outgoing>SequenceFlow_1tfi3sp</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:startEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isSyncResponseSent" name="Sync response sent?" default="SequenceFlow_0x34g02">
+ <bpmn2:incoming>SequenceFlow_1tfi3sp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x34g02</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1q9kksk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_sendSyncErrorResp" name="Send sync error response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0x34g02</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_sendSyncErrorResp" targetRef="ExclusiveGateway_0of872x" />
+ <bpmn2:scriptTask id="ScriptTask_prefalloutHandlerRequest" name="Prepare Fallout Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1v1jx7y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareFalloutHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_prefalloutHandlerRequest" targetRef="CallActivity_callFalloutHandler" />
+ <bpmn2:callActivity id="CallActivity_callFalloutHandler" name="Call Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callFalloutHandler" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4" name="End">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09n39bk" name="Is rollback on?" default="SequenceFlow_1cu5t8k">
+ <bpmn2:incoming>SequenceFlow_1q9kksk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cu5t8k</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1tfh1vm</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="Task_0nc3wxy" name="Log and save original exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1tfh1vm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0b1nrfk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('logAndSaveOriginalException', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_1b9yx6k" name="DoCreateVfModuleVolumeRollback" calledElement="DoCreateVfModuleVolumeRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="requestId" target="mso-request-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="workflowException" target="workflowException" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:in source="rolledBack" target="rolledBack" />
+ <camunda:in source="workflowException" target="workflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0b1nrfk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08vm13o</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_1lkduwj" name="Validate Rollback Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_08vm13o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_097zy8w</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('validateRollbackResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_0of872x">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1cu5t8k</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_097zy8w</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1v1jx7y</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tfi3sp" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x34g02" name="No" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_sendSyncErrorResp" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1q9kksk" name="Yes" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ExclusiveGateway_09n39bk">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVMVINFRAV1_syncResponseSent") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cu5t8k" name="No" sourceRef="ExclusiveGateway_09n39bk" targetRef="ExclusiveGateway_0of872x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1tfh1vm" name="Yes" sourceRef="ExclusiveGateway_09n39bk" targetRef="Task_0nc3wxy">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVMVINFRAV1_backoutOnFailure") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0b1nrfk" sourceRef="Task_0nc3wxy" targetRef="Task_1b9yx6k" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08vm13o" sourceRef="Task_1b9yx6k" targetRef="Task_1lkduwj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_097zy8w" sourceRef="Task_1lkduwj" targetRef="ExclusiveGateway_0of872x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1v1jx7y" sourceRef="ExclusiveGateway_0of872x" targetRef="ScriptTask_prefalloutHandlerRequest" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSyncAckResponse" />
+ <bpmn2:scriptTask id="ScriptTask_sendSyncAckResponse" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_sendSyncAckResponse" targetRef="ExclusiveGateway_isVolGrpnamePresent" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isVolGrpnamePresent" name="Is volume group name present?" default="SequenceFlow_volGrpNameMissing">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_volGrpNamePresent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_volGrpNameMissing</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpNamePresent" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="CallActivity_doCreateVfModuleVolumeV2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{volumeGroupName != null && volumeGroupName != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpNameMissing" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="ScriptTask_buildError" />
+ <bpmn2:scriptTask id="ScriptTask_buildError" name="Build Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpNameMissing</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group name not present in request.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_buildError" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_doCreateVfModuleVolumeV2" name="Call DoCreateVfModuleVolumeV2" calledElement="DoCreateVfModuleVolumeV2">
+ <bpmn2:extensionElements>
+ <camunda:out source="DCVFMODVOLV1_SuccessIndicator" target="DCVFMODVOLV1_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="requestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="test-volume-group-name" target="test-volume-group-name" />
+ <camunda:in source="test-volume-group-id" target="test-volume-group-id" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="requestId" target="mso-request-id" />
+ <camunda:in source="vfModuleInputParams" target="vfModuleInputParams" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_volGrpNamePresent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0djjra2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_setSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_setSuccessIndicator" targetRef="EndEvent_3" />
+ <bpmn2:callActivity id="CallActivity_completeMsoProcess" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CallActivity_completeMsoProcess" targetRef="ScriptTask_setSuccessIndicator" />
+ <bpmn2:scriptTask id="ScriptTask_postCompletionRequest" name="Post Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('postProcessResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_postCompletionRequest" targetRef="CallActivity_completeMsoProcess" />
+ <bpmn2:serviceTask id="ServiceTask_callDbInfraUpdate" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVMVINFRAV1_createDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVMVINFRAV1_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="CVMVINFRAV1_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_callDbInfraUpdate" targetRef="ScriptTask_postCompletionRequest" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0djjra2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="ServiceTask_callDbInfraUpdate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0djjra2" sourceRef="CallActivity_doCreateVfModuleVolumeV2" targetRef="ScriptTask_prepareDbInfraRequest" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1">
+ <dc:Bounds x="201" y="156" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="197" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_67" targetElement="_BPMNShape_ScriptTask_300">
+ <di:waypoint xsi:type="dc:Point" x="237" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="271" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="254" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds x="271" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse">
+ <dc:Bounds x="404" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true">
+ <dc:Bounds x="556" y="149" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="540" y="204" width="81" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError">
+ <dc:Bounds x="531" y="253" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV2">
+ <dc:Bounds x="705" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_volGrpNamePresent" sourceElement="_BPMNShape_ExclusiveGateway_249">
+ <di:waypoint xsi:type="dc:Point" x="606" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="705" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="656" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_249">
+ <di:waypoint xsi:type="dc:Point" x="504" y="175" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="530" y="159.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_ScriptTask_301">
+ <di:waypoint xsi:type="dc:Point" x="371" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_volGrpNameMissing" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_ScriptTask_302">
+ <di:waypoint xsi:type="dc:Point" x="581" y="199" />
+ <di:waypoint xsi:type="dc:Point" x="582" y="253" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2">
+ <dc:Bounds x="563" y="379" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_233">
+ <di:waypoint xsi:type="dc:Point" x="580" y="333" />
+ <di:waypoint xsi:type="dc:Point" x="581" y="379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="341" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1456" y="156" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1474" y="197" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true">
+ <dc:Bounds x="213" y="461" width="895" height="549" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors">
+ <dc:Bounds x="263" y="771" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="239" y="812" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4">
+ <dc:Bounds x="989" y="771" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1042" y="778" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds x="835" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate">
+ <dc:Bounds x="963" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest">
+ <dc:Bounds x="1086" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess">
+ <dc:Bounds x="1211" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ServiceTask_103">
+ <di:waypoint xsi:type="dc:Point" x="935" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="949" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ScriptTask_305">
+ <di:waypoint xsi:type="dc:Point" x="1063" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1075" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_CallActivity_37">
+ <di:waypoint xsi:type="dc:Point" x="1186" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1211" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1199" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator">
+ <dc:Bounds x="1337" y="134" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_37" targetElement="_BPMNShape_ScriptTask_306">
+ <di:waypoint xsi:type="dc:Point" x="1311" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="1337" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1324" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_EndEvent_234">
+ <di:waypoint xsi:type="dc:Point" x="1437" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="1456" y="173" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1447" y="158" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest">
+ <dc:Bounds x="725" y="749" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler">
+ <dc:Bounds x="858" y="749" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_CallActivity_50">
+ <di:waypoint xsi:type="dc:Point" x="825" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="858" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="774" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_50" targetElement="_BPMNShape_EndEvent_235">
+ <di:waypoint xsi:type="dc:Point" x="958" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="989" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="974" y="774" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true">
+ <dc:Bounds x="380" y="764" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="819" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp">
+ <dc:Bounds x="355" y="879" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_ScriptTask_307">
+ <di:waypoint xsi:type="dc:Point" x="455" y="919" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="919" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="814" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09n39bk_di" bpmnElement="ExclusiveGateway_09n39bk" isMarkerVisible="true">
+ <dc:Bounds x="492.646" y="764" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="482" y="814" width="71" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0z3e4ts_di" bpmnElement="Task_0nc3wxy">
+ <dc:Bounds x="468" y="644" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1td0fj3_di" bpmnElement="Task_1b9yx6k">
+ <dc:Bounds x="468" y="530" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0mld0ou_di" bpmnElement="Task_1lkduwj">
+ <dc:Bounds x="614" y="530" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_1gkubx4_di" bpmnElement="ExclusiveGateway_0of872x">
+ <dc:Bounds x="639" y="764" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="664" y="814" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tfi3sp_di" bpmnElement="SequenceFlow_1tfi3sp">
+ <di:waypoint xsi:type="dc:Point" x="299" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="380" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="340" y="764" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x34g02_di" bpmnElement="SequenceFlow_0x34g02">
+ <di:waypoint xsi:type="dc:Point" x="405" y="814" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="413" y="847" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q9kksk_di" bpmnElement="SequenceFlow_1q9kksk">
+ <di:waypoint xsi:type="dc:Point" x="430" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="453" y="764" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cu5t8k_di" bpmnElement="SequenceFlow_1cu5t8k">
+ <di:waypoint xsi:type="dc:Point" x="543" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="764" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tfh1vm_di" bpmnElement="SequenceFlow_1tfh1vm">
+ <di:waypoint xsi:type="dc:Point" x="518" y="764" />
+ <di:waypoint xsi:type="dc:Point" x="518" y="724" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" y="734" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b1nrfk_di" bpmnElement="SequenceFlow_0b1nrfk">
+ <di:waypoint xsi:type="dc:Point" x="518" y="644" />
+ <di:waypoint xsi:type="dc:Point" x="518" y="610" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="533" y="627" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08vm13o_di" bpmnElement="SequenceFlow_08vm13o">
+ <di:waypoint xsi:type="dc:Point" x="568" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="591" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="591" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="570" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_097zy8w_di" bpmnElement="SequenceFlow_097zy8w">
+ <di:waypoint xsi:type="dc:Point" x="664" y="610" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="764" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="687" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1v1jx7y_di" bpmnElement="SequenceFlow_1v1jx7y">
+ <di:waypoint xsi:type="dc:Point" x="689" y="789" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="789" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="707" y="774" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0djjra2_di" bpmnElement="SequenceFlow_0djjra2">
+ <di:waypoint xsi:type="dc:Point" x="805" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="835" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="820" y="159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVnfInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVnfInfra.bpmn
new file mode 100644
index 0000000000..6af8c2248e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVnfInfra.bpmn
@@ -0,0 +1,340 @@
+<?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.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CreateVnfInfra" name="CreateVnfInfra" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="sendResponse" />
+ <bpmn2:scriptTask id="sendResponse" name="Send Sync Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" targetRef="QueryCatalogDB" />
+ <bpmn2:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_requestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="CREVI_suppressRollback" target="disableRollback" />
+ <camunda:in source="CREVI_vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="CREVI_vnfType" target="vnfType" />
+ <camunda:in source="CREVI_vnfName" target="vnfName" />
+ <camunda:in source="CREVI_vnfId" target="vnfId" />
+ <camunda:in source="CREVI_serviceId" target="productFamilyId" />
+ <camunda:in source="CREVI_vnfInputParameters" target="vnfInputParameters" />
+ <camunda:out source="vnfId" target="CREVI_vnfId" />
+ <camunda:out source="vnfOutputParameters" target="CREVI_vnfOutputParameters" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="CREVI_lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="CREVI_tenantId" target="tenandId" />
+ <camunda:in source="CREVI_vnfResourceDecomposition" target="vnfResourceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ed0uiq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w0m5fr</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.utils.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="processJavaError" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError" />
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:callActivity id="callFalloutHandler" name="Call&#10;&#10;FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="CREVI_requestId" target="requestId" />
+ <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_5" />
+ <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="processError" targetRef="callFalloutHandler" />
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_34" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="processError" />
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="StartEvent_3" targetRef="sendErrorResponse" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcess" name="Prepare Completion Handler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_01mjjk3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="postProcess" targetRef="callCompletionHandler" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="callCompletionHandler" name="Completion&#10;&#10;Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_completionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="CREVI_requestId" target="mso-request-id" />
+ <camunda:in source="CREVI_serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ed0uiq" sourceRef="QueryCatalogDB" targetRef="CreateVNF" />
+ <bpmn2:scriptTask id="QueryCatalogDB" name="Query Catalog DB" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ed0uiq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.queryCatalogDB(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w0m5fr" sourceRef="CreateVNF" targetRef="Task_1gmhhag" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0s4i7px" sourceRef="Task_1gmhhag" targetRef="Task_1307onz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_01mjjk3" sourceRef="Task_1307onz" targetRef="postProcess" />
+ <bpmn2:scriptTask id="Task_1gmhhag" name="Create Platform" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0w0m5fr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0s4i7px</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.createPlatform(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1307onz" name="Create Line-of-Business" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0s4i7px</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01mjjk3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.createLineOfBusiness(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="96" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="114" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="216" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="sendResponse">
+ <dc:Bounds x="341" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_286">
+ <di:waypoint xsi:type="dc:Point" x="316" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="341" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="CreateVNF">
+ <dc:Bounds x="618" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_CallActivity_59">
+ <di:waypoint xsi:type="dc:Point" x="441" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="460" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1340" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1313" y="263" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="253" y="696" width="313" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">
+ <dc:Bounds x="277" y="763" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="295" y="804" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
+ <dc:Bounds x="360" y="741" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">
+ <dc:Bounds x="505" y="763" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="523" y="804" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_76" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="313" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_234">
+ <di:waypoint xsi:type="dc:Point" x="460" y="781" />
+ <di:waypoint xsi:type="dc:Point" x="505" y="781" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="477" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_33" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="109" y="433" width="601" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_77" bpmnElement="StartEvent_3">
+ <dc:Bounds x="133" y="532" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="573" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_5">
+ <dc:Bounds x="649" y="532" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="573" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_62" bpmnElement="callFalloutHandler">
+ <dc:Bounds x="493" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_309" bpmnElement="processError">
+ <dc:Bounds x="361" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_77" targetElement="_BPMNShape_ScriptTask_312">
+ <di:waypoint xsi:type="dc:Point" x="169" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_309" targetElement="_BPMNShape_CallActivity_62">
+ <di:waypoint xsi:type="dc:Point" x="461" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_62" targetElement="_BPMNShape_EndEvent_235">
+ <di:waypoint xsi:type="dc:Point" x="593" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="649" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="618" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="sendErrorResponse">
+ <dc:Bounds x="229" y="510" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_ScriptTask_309">
+ <di:waypoint xsi:type="dc:Point" x="329" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="342" y="550" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_325" bpmnElement="postProcess">
+ <dc:Bounds x="1042" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_325" targetElement="_BPMNShape_CallActivity_69">
+ <di:waypoint xsi:type="dc:Point" x="1142" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1192" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_69" bpmnElement="callCompletionHandler">
+ <dc:Bounds x="1192" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_69" targetElement="_BPMNShape_EndEvent_228">
+ <di:waypoint xsi:type="dc:Point" x="1292" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ed0uiq_di" bpmnElement="SequenceFlow_0ed0uiq">
+ <di:waypoint xsi:type="dc:Point" x="578" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z4xe39_di" bpmnElement="QueryCatalogDB">
+ <dc:Bounds x="478" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w0m5fr_di" bpmnElement="SequenceFlow_0w0m5fr">
+ <di:waypoint xsi:type="dc:Point" x="718" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="757" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s4i7px_di" bpmnElement="SequenceFlow_0s4i7px">
+ <di:waypoint xsi:type="dc:Point" x="857" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="889" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="873" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01mjjk3_di" bpmnElement="SequenceFlow_01mjjk3">
+ <di:waypoint xsi:type="dc:Point" x="989" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1042" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1015.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wah48v_di" bpmnElement="Task_1gmhhag">
+ <dc:Bounds x="757" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0fy16oq_di" bpmnElement="Task_1307onz">
+ <dc:Bounds x="889" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..2d68d650c5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
@@ -0,0 +1,381 @@
+<?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.11.3">
+ <bpmn:process id="DeleteCustomE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_00m8zen" name="Delete SI Start Flow">
+ <bpmn:outgoing>SequenceFlow_1wxumid</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:subProcess id="SubProcess_0amn8vu" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_1c6ogpt" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0guajy5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0dbt753</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_121296y">
+ <bpmn:outgoing>SequenceFlow_0guajy5</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1dw3dwx">
+ <bpmn:incoming>SequenceFlow_0dbt753</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0guajy5" name="" sourceRef="StartEvent_121296y" targetRef="ScriptTask_1c6ogpt" />
+ <bpmn:sequenceFlow id="SequenceFlow_0dbt753" name="" sourceRef="ScriptTask_1c6ogpt" targetRef="EndEvent_1dw3dwx" />
+ </bpmn:subProcess>
+ <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstance&#10;" calledElement="DoDeleteE2EServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0zf2qyk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07hrbs0</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:endEvent id="EndEvent_0db8bs6" name="End">
+ <bpmn:incoming>SequenceFlow_1ab5l2q</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0a63hms" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1wxumid</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yowshs</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DeleteCustomE2EServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1fzpbop" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_04urx2e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ii935p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1wx4ihe" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1ii935p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ab5l2q</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_1vbcima" name="Sub-process for FalloutHandler " triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0jybicw">
+ <bpmn:outgoing>SequenceFlow_0for83z</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1jegbhy">
+ <bpmn:incoming>SequenceFlow_0hrazlh</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0so3xj0" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1s1cbgf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1py6yqz</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1qhekgt" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1py6yqz</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0hrazlh</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="ScriptTask_006nty7" name="Send Error Response">
+ <bpmn:incoming>SequenceFlow_0for83z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s1cbgf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.sendSyncError(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0for83z" sourceRef="StartEvent_0jybicw" targetRef="ScriptTask_006nty7" />
+ <bpmn:sequenceFlow id="SequenceFlow_0hrazlh" sourceRef="CallActivity_1qhekgt" targetRef="EndEvent_1jegbhy" />
+ <bpmn:sequenceFlow id="SequenceFlow_1s1cbgf" sourceRef="ScriptTask_006nty7" targetRef="ScriptTask_0so3xj0" />
+ <bpmn:sequenceFlow id="SequenceFlow_1py6yqz" sourceRef="ScriptTask_0so3xj0" targetRef="CallActivity_1qhekgt" />
+ </bpmn:subProcess>
+ <bpmn:scriptTask id="ScriptTask_1mao77y" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1dkcu9o</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0zf2qyk</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0vu8gx6" name="Success?" default="SequenceFlow_1t6ekab">
+ <bpmn:incoming>SequenceFlow_07hrbs0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_04urx2e</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1t6ekab</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_1i1g9s6">
+ <bpmn:incoming>SequenceFlow_1t6ekab</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1erlsmy" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1wxumid" sourceRef="StartEvent_00m8zen" targetRef="ScriptTask_0a63hms" />
+ <bpmn:sequenceFlow id="SequenceFlow_0zf2qyk" sourceRef="ScriptTask_1mao77y" targetRef="CallActivity_1vyx9hu" />
+ <bpmn:sequenceFlow id="SequenceFlow_07hrbs0" sourceRef="CallActivity_1vyx9hu" targetRef="ExclusiveGateway_0vu8gx6" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ab5l2q" sourceRef="CallActivity_1wx4ihe" targetRef="EndEvent_0db8bs6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yowshs" sourceRef="ScriptTask_0a63hms" targetRef="Task_1jksf62" />
+ <bpmn:sequenceFlow id="SequenceFlow_04urx2e" name="yes" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="ScriptTask_1fzpbop">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1ii935p" sourceRef="ScriptTask_1fzpbop" targetRef="CallActivity_1wx4ihe" />
+ <bpmn:sequenceFlow id="SequenceFlow_1t6ekab" name="no" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="EndEvent_1i1g9s6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0c4t26p" sourceRef="Task_1jksf62" targetRef="ServiceTask_0j9q5xe" />
+ <bpmn:scriptTask id="Task_1jksf62" name="prepare init operation status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0yowshs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c4t26p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DeleteCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_0j9q5xe" name="Update Service Operation Status">
+ <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_updateServiceOperStatusRequest}</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_0c4t26p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1dkcu9o</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1dkcu9o" sourceRef="ServiceTask_0j9q5xe" targetRef="ScriptTask_1mao77y" />
+ </bpmn:process>
+ <bpmn:error id="Error_1erlsmy" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteCustomE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_00m8zen_di" bpmnElement="StartEvent_00m8zen">
+ <dc:Bounds x="490" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="471" y="250" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0amn8vu_di" bpmnElement="SubProcess_0amn8vu" isExpanded="true">
+ <dc:Bounds x="834" y="660" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1vyx9hu_di" bpmnElement="CallActivity_1vyx9hu">
+ <dc:Bounds x="1121" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0db8bs6_di" bpmnElement="EndEvent_0db8bs6">
+ <dc:Bounds x="1646" y="304" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1657" y="340" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0a63hms_di" bpmnElement="ScriptTask_0a63hms">
+ <dc:Bounds x="562" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1fzpbop_di" bpmnElement="ScriptTask_1fzpbop">
+ <dc:Bounds x="1453" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1wx4ihe_di" bpmnElement="CallActivity_1wx4ihe">
+ <dc:Bounds x="1614" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1vbcima_di" bpmnElement="SubProcess_1vbcima" isExpanded="true">
+ <dc:Bounds x="736" y="374" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1mao77y_di" bpmnElement="ScriptTask_1mao77y">
+ <dc:Bounds x="970" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0vu8gx6_di" bpmnElement="ExclusiveGateway_0vu8gx6" isMarkerVisible="true">
+ <dc:Bounds x="1318" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1318" y="174" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1i1g9s6_di" bpmnElement="EndEvent_1i1g9s6">
+ <dc:Bounds x="1325" y="304" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1298" y="340" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wxumid_di" bpmnElement="SequenceFlow_1wxumid">
+ <di:waypoint xsi:type="dc:Point" x="526" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="562" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="206" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zf2qyk_di" bpmnElement="SequenceFlow_0zf2qyk">
+ <di:waypoint xsi:type="dc:Point" x="1070" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1121" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1050.5" y="206" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07hrbs0_di" bpmnElement="SequenceFlow_07hrbs0">
+ <di:waypoint xsi:type="dc:Point" x="1221" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1318" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1225.5" y="212" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ab5l2q_di" bpmnElement="SequenceFlow_1ab5l2q">
+ <di:waypoint xsi:type="dc:Point" x="1664" y="267" />
+ <di:waypoint xsi:type="dc:Point" x="1664" y="304" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1634" y="279.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yowshs_di" bpmnElement="SequenceFlow_0yowshs">
+ <di:waypoint xsi:type="dc:Point" x="662" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639.5" y="206" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04urx2e_di" bpmnElement="SequenceFlow_04urx2e">
+ <di:waypoint xsi:type="dc:Point" x="1368" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1453" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1370.25" y="203" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ii935p_di" bpmnElement="SequenceFlow_1ii935p">
+ <di:waypoint xsi:type="dc:Point" x="1553" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1614" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1495" y="212" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t6ekab_di" bpmnElement="SequenceFlow_1t6ekab">
+ <di:waypoint xsi:type="dc:Point" x="1343" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="1343" y="277" />
+ <di:waypoint xsi:type="dc:Point" x="1343" y="277" />
+ <di:waypoint xsi:type="dc:Point" x="1343" y="304" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1352" y="277" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1c6ogpt_di" bpmnElement="ScriptTask_1c6ogpt">
+ <dc:Bounds x="982" y="715" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_121296y_di" bpmnElement="StartEvent_121296y">
+ <dc:Bounds x="867" y="737" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="795" y="778" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1dw3dwx_di" bpmnElement="EndEvent_1dw3dwx">
+ <dc:Bounds x="1143" y="737" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1071" y="778" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0jybicw_di" bpmnElement="StartEvent_0jybicw">
+ <dc:Bounds x="752" y="460" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="680" y="501" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1jegbhy_di" bpmnElement="EndEvent_1jegbhy">
+ <dc:Bounds x="1331" y="460" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1259" y="501" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0so3xj0_di" bpmnElement="ScriptTask_0so3xj0">
+ <dc:Bounds x="1010" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1qhekgt_di" bpmnElement="CallActivity_1qhekgt">
+ <dc:Bounds x="1187" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_006nty7_di" bpmnElement="ScriptTask_006nty7">
+ <dc:Bounds x="832" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0guajy5_di" bpmnElement="SequenceFlow_0guajy5">
+ <di:waypoint xsi:type="dc:Point" x="903" y="755" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="755" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="856" y="755" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dbt753_di" bpmnElement="SequenceFlow_0dbt753">
+ <di:waypoint xsi:type="dc:Point" x="1082" y="755" />
+ <di:waypoint xsi:type="dc:Point" x="1143" y="755" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="755" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0for83z_di" bpmnElement="SequenceFlow_0for83z">
+ <di:waypoint xsi:type="dc:Point" x="788" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="810" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="810" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="735" y="478" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hrazlh_di" bpmnElement="SequenceFlow_0hrazlh">
+ <di:waypoint xsi:type="dc:Point" x="1287" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="1331" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1219" y="463" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s1cbgf_di" bpmnElement="SequenceFlow_1s1cbgf">
+ <di:waypoint xsi:type="dc:Point" x="932" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="1010" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="884" y="478" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1py6yqz_di" bpmnElement="SequenceFlow_1py6yqz">
+ <di:waypoint xsi:type="dc:Point" x="1110" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1060" y="463" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c4t26p_di" bpmnElement="SequenceFlow_0c4t26p">
+ <di:waypoint xsi:type="dc:Point" x="807" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="833" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="820" y="206" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1joo7s7_di" bpmnElement="Task_1jksf62">
+ <dc:Bounds x="707" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0j9q5xe_di" bpmnElement="ServiceTask_0j9q5xe">
+ <dc:Bounds x="833" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dkcu9o_di" bpmnElement="SequenceFlow_1dkcu9o">
+ <di:waypoint xsi:type="dc:Point" x="933" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="970" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951.5" y="206" 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/DeleteGenericALaCarteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
new file mode 100644
index 0000000000..5c9a80072a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteGenericALaCarteServiceInstance" name="DeleteGenericALaCarteServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteSI_startEvent" name="Delete SI Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doDeleteServiceInstance_CallActivity" name="Call DoDeleteServiceInstance&#10;" calledElement="DoDeleteServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in sourceExpression="1610" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doDeleteServiceInstance_CallActivity" targetRef="ExclusiveGateway_0isueuw" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ktadna</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DeleteGenericALaCarteServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="deleteSI_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qjygj5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14eadeb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_0o4smqp" />
+ <bpmn2:scriptTask id="ScriptTask_0o4smqp" name="Send Error Response">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14eadeb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance()
+csi.sendSyncError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14eadeb" sourceRef="ScriptTask_0o4smqp" targetRef="ScriptTask_1hql91g" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="EndEvent_0o440av" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doDeleteServiceInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ktadna</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteGenericALaCarteServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ktadna" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_1nko5zz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0isueuw" name="Success?" default="SequenceFlow_0hgiouk">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qjygj5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0hgiouk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qjygj5" name="yes" sourceRef="ExclusiveGateway_0isueuw" targetRef="ScriptTask_0cihgpv">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_0yhby6h">
+ <bpmn2:incoming>SequenceFlow_0hgiouk</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0hgiouk" name="no" sourceRef="ExclusiveGateway_0isueuw" targetRef="EndEvent_0yhby6h" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteGenericALaCarteServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteSI_startEvent">
+ <dc:Bounds x="117" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="98" y="120" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="410" y="607" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="443" y="684" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="558" y="662" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="719" y="684" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="725" width="0" 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="479" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="702" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="521" y="702" width="0" 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="658" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="719" y="702" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="702" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doDeleteServiceInstance_CallActivity">
+ <dc:Bounds x="700" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1276" y="174" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1287" y="210" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="800" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="897" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="849" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="281" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="153" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="281" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="217" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="1083" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1244" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1183" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1214" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="585" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="762" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="312" y="321" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="327" y="407" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="448" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="906" y="407" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="924" y="448" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="685" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="724" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="862" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="906" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="884" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1294" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1309" y="155.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="363" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="406" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="599" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="700" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="499" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ktadna_di" bpmnElement="SequenceFlow_0ktadna">
+ <di:waypoint xsi:type="dc:Point" x="381" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="499" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o4smqp_di" bpmnElement="ScriptTask_0o4smqp">
+ <dc:Bounds x="407" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14eadeb_di" bpmnElement="SequenceFlow_14eadeb">
+ <di:waypoint xsi:type="dc:Point" x="507" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="534" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="534" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="585" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="549" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0isueuw_di" bpmnElement="ExclusiveGateway_0isueuw" isMarkerVisible="true">
+ <dc:Bounds x="897" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="44" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qjygj5_di" bpmnElement="SequenceFlow_1qjygj5">
+ <di:waypoint xsi:type="dc:Point" x="947" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="955" y="73" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0yhby6h_di" bpmnElement="EndEvent_0yhby6h">
+ <dc:Bounds x="904" y="174" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="922" y="210" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hgiouk_di" bpmnElement="SequenceFlow_0hgiouk">
+ <di:waypoint xsi:type="dc:Point" x="922" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="174" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteNetworkInstance.bpmn
new file mode 100644
index 0000000000..a62e16525d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteNetworkInstance.bpmn
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteNetworkInstance" name="DeleteNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def networkMod = new DeleteNetworkInstance()
+networkMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doDeleteNetworkInstance_CallActivity" name="DoDelete Network Instance&#10;" calledElement="DoDeleteNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="networkName" target="networkName" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="DeleteNetwork PostProcess Success&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doDeleteNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def preProcess = new DeleteNetworkInstance()
+preProcess.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareCompletion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1akfe0b" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s5niqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_0sztuly" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELNI_deleteDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELNI_deleteDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELNI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1s5niqb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06s5eu4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06s5eu4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.buildErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s5niqb" sourceRef="ScriptTask_1akfe0b" targetRef="ServiceTask_0sztuly" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06s5eu4" sourceRef="ServiceTask_0sztuly" targetRef="ScriptTask_1hql91g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1akfe0b" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doDeleteNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.getNetworkModelInfo(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DeleteNetworkInstance = new DeleteNetworkInstance()
+DeleteNetworkInstance.sendSyncResponse(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-8" y="786" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="25" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="140" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="301" y="863" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="319" y="904" width="0" 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="61" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="881" width="0" 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="240" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="881" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doDeleteNetworkInstance_CallActivity">
+ <dc:Bounds x="673" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="773" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="920" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="847" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint xsi:type="dc:Point" x="39" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint xsi:type="dc:Point" x="239" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="291" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="920" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1086" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1akfe0b_di" bpmnElement="ScriptTask_1akfe0b">
+ <dc:Bounds x="189" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0sztuly_di" bpmnElement="ServiceTask_0sztuly">
+ <dc:Bounds x="384" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="563" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="738" y="525" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="-13" y="353" width="1021" height="404" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="83" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="913" y="547" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="931" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5niqb_di" bpmnElement="SequenceFlow_1s5niqb">
+ <di:waypoint xsi:type="dc:Point" x="289" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06s5eu4_di" bpmnElement="SequenceFlow_06s5eu4">
+ <di:waypoint xsi:type="dc:Point" x="484" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="663" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="838" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="876" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1186" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1220" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="119" y="565" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="154" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint xsi:type="dc:Point" x="442" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="515" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="615" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="673" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="342" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="515" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2: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
new file mode 100644
index 0000000000..a1c75a8740
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DeleteSDNCNetworkResource" name="DeleteSDNCNetworkResource" isExecutable="true">
+ <bpmn:startEvent id="deleteNetworkResource_StartEvent" name="deleteNetworkResource_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNetworkResource_StartEvent" targetRef="Task_1dlrfiw" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0tezqd4" />
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareSDNCRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_1x6k78c" name="delete SDNC call end">
+ <bpmn:incoming>SequenceFlow_15wux6a</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC &#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="DELSDNCRES_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELSDNCRES_sdncDeleteReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="DELSDNCRES_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xk5xed</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1xk5xed" sourceRef="CallActivity_1600xlj" targetRef="Task_0uwlr22" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="ScriptTask_1emjxm2" />
+ <bpmn:scriptTask id="Task_023hred" name="post SDNC delete call">
+ <bpmn:incoming>SequenceFlow_1vnx1pp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.postDeleteSDNCCall(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
+ <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
+ <bpmn:script><![CDATA[String recipeParamXsdDemo="""{"operationType":"GRE"}"""
+String recipeParamXsd=""
+execution.setVariable("recipeParamXsd", recipeParamXsd)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0w2es8j</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" />
+ <bpmn:sequenceFlow id="SequenceFlow_15mvedq" sourceRef="Task_18tomkl" targetRef="CallActivity_1600xlj" />
+ <bpmn:scriptTask id="Task_0tezqd4" name="Delete progress update parameters before delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareUpdateAfterDeleteSDNCResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_18tomkl" name="update 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_1mz0vdx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update 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_1jr6zi0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1vnx1pp</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vnx1pp" sourceRef="ServiceTask_1cm8iwr" targetRef="Task_023hred" />
+ <bpmn:scriptTask id="ScriptTask_1emjxm2" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15wux6a</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteSDNCNetworkResource()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_15wux6a" sourceRef="ScriptTask_1emjxm2" targetRef="EndEvent_1x6k78c" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSDNCNetworkResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent">
+ <dc:Bounds x="-111" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-136" y="147" width="89" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <di:waypoint xsi:type="dc:Point" x="-75" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="-10" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-87.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+ <di:waypoint xsi:type="dc:Point" x="413" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="460" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="500" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="313" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="967" y="317" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="359" width="79" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
+ <dc:Bounds x="109" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
+ <di:waypoint xsi:type="dc:Point" x="209" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="210.5" y="314" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+ <di:waypoint xsi:type="dc:Point" x="735" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="314" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+ <dc:Bounds x="635" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
+ <di:waypoint xsi:type="dc:Point" x="90" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="148" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="74" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+ <di:waypoint xsi:type="dc:Point" x="248" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="313" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
+ <dc:Bounds x="-10" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+ <dc:Bounds x="148" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
+ <di:waypoint xsi:type="dc:Point" x="606" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="123" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq">
+ <di:waypoint xsi:type="dc:Point" x="788" y="169" />
+ <di:waypoint xsi:type="dc:Point" x="788" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="0" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="0" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="109" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="197" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+ <dc:Bounds x="506" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
+ <dc:Bounds x="302" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
+ <dc:Bounds x="738" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+ <dc:Bounds x="487" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
+ <di:waypoint xsi:type="dc:Point" x="402" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="487" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="444.5" y="314" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp">
+ <di:waypoint xsi:type="dc:Point" x="587" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="635" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="566" y="314" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2">
+ <dc:Bounds x="793" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15wux6a_di" bpmnElement="SequenceFlow_15wux6a">
+ <di:waypoint xsi:type="dc:Point" x="893" y="335" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="335" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="930" y="313" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVFCNSResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVFCNSResource.bpmn
new file mode 100644
index 0000000000..bbc7ead144
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVFCNSResource.bpmn
@@ -0,0 +1,166 @@
+<?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.11.3">
+ <bpmn:process id="DeleteVFCNSResource" name="DeleteVFCNSResource" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Start Custom Delete E2E NS">
+ <bpmn:outgoing>SequenceFlow_0x2e9we</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0x2e9we" sourceRef="StartEvent_1" targetRef="Task_0yl3rau" />
+ <bpmn:sequenceFlow id="SequenceFlow_00vpfm3" sourceRef="Task_0yl3rau" targetRef="Task_14gmbq4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1s4cyms" sourceRef="Task_14gmbq4" targetRef="Task_1e27uaw" />
+ <bpmn:endEvent id="EndEvent_07ew0rf" name="End Custom Delete E2E NS">
+ <bpmn:incoming>SequenceFlow_0jvtdhv</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_152xb4z" sourceRef="Task_1e27uaw" targetRef="ScriptTask_0pkuukn" />
+ <bpmn:scriptTask id="Task_0yl3rau" name="DoCustomDeleteE2ENS prepare" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0x2e9we</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00vpfm3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1e27uaw" name="Post delet NS resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1s4cyms</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_152xb4z</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.postProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_14gmbq4" name="Call Delete NS Instance" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:out source="operationStatus" target="operationStatus" />
+ <camunda:out source="nsInstanceId" target="nsInstanceId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_00vpfm3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s4cyms</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_11qmm22" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0zwedl6">
+ <bpmn:outgoing>SequenceFlow_0yro7o2</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_10tfowz">
+ <bpmn:incoming>SequenceFlow_0p0ayci</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0tdtqwh" name="Log / Print Unexpected Error">
+ <bpmn:incoming>SequenceFlow_0yro7o2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0p0ayci</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0yro7o2" sourceRef="StartEvent_0zwedl6" targetRef="ScriptTask_0tdtqwh" />
+ <bpmn:sequenceFlow id="SequenceFlow_0p0ayci" sourceRef="ScriptTask_0tdtqwh" targetRef="EndEvent_10tfowz" />
+ </bpmn:subProcess>
+ <bpmn:scriptTask id="ScriptTask_0pkuukn" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_152xb4z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0jvtdhv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dsi = new DeleteVFCNSResource()
+dsi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0jvtdhv" sourceRef="ScriptTask_0pkuukn" targetRef="EndEvent_07ew0rf" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVFCNSResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="330" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="312" y="372" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x2e9we_di" bpmnElement="SequenceFlow_0x2e9we">
+ <di:waypoint xsi:type="dc:Point" x="366" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="474" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="333" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00vpfm3_di" bpmnElement="SequenceFlow_00vpfm3">
+ <di:waypoint xsi:type="dc:Point" x="574" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="661" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="572.5" y="333" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s4cyms_di" bpmnElement="SequenceFlow_1s4cyms">
+ <di:waypoint xsi:type="dc:Point" x="761" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="889" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="780" y="333" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_07ew0rf_di" bpmnElement="EndEvent_07ew0rf">
+ <dc:Bounds x="1313" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1293" y="376" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_152xb4z_di" bpmnElement="SequenceFlow_152xb4z">
+ <di:waypoint xsi:type="dc:Point" x="989" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1113" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1006" y="333" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ssr09e_di" bpmnElement="Task_0yl3rau">
+ <dc:Bounds x="474" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_092ktxo_di" bpmnElement="Task_1e27uaw">
+ <dc:Bounds x="889" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_00p99pt_di" bpmnElement="Task_14gmbq4">
+ <dc:Bounds x="661" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_11qmm22_di" bpmnElement="SubProcess_11qmm22" isExpanded="true">
+ <dc:Bounds x="636" y="539" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0zwedl6_di" bpmnElement="StartEvent_0zwedl6">
+ <dc:Bounds x="667" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="644" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_10tfowz_di" bpmnElement="EndEvent_10tfowz">
+ <dc:Bounds x="931" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="645" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tdtqwh_di" bpmnElement="ScriptTask_0tdtqwh">
+ <dc:Bounds x="763" y="584" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yro7o2_di" bpmnElement="SequenceFlow_0yro7o2">
+ <di:waypoint xsi:type="dc:Point" x="703" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="688" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p0ayci_di" bpmnElement="SequenceFlow_0p0ayci">
+ <di:waypoint xsi:type="dc:Point" x="863" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="931" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pkuukn_di" bpmnElement="ScriptTask_0pkuukn">
+ <dc:Bounds x="1113" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jvtdhv_di" bpmnElement="SequenceFlow_0jvtdhv">
+ <di:waypoint xsi:type="dc:Point" x="1213" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1263" y="333" 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/DeleteVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
new file mode 100644
index 0000000000..a835946d1d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
@@ -0,0 +1,812 @@
+<?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: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>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService = new DeleteVcpeResCustService()
+DeleteVcpeResCustService.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVCPE_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVCPE_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService = new DeleteVcpeResCustService()
+DeleteVcpeResCustService.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vCPE-RESCUST">
+ <bpmn2:outgoing>SequenceFlow_10o22u2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vCPE-RESCUST" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &#38; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService = new DeleteVcpeResCustService()
+DeleteVcpeResCustService.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="DVRCS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DeleteVcpeResCustServiceSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="DeleteVCPE_EndEvent" />
+ <bpmn2:endEvent id="DeleteVCPE_EndEvent" name="End">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService = new DeleteVcpeResCustService()
+DeleteVcpeResCustService.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:callActivity id="doDeleteServiceInstance_CallActivity" name="DoDelete&#10;ServiceInstance&#10;" calledElement="DoDeleteServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rollbackData" target="DCRESI_rollbackData" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rolledBack" target="DCRESI_rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10o22u2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04ao07f</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoQueryServiceInstance">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="QueryServiceInstance" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_06llof4</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DVRCS_falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_04xute7">
+ <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06llof4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService = new DeleteVcpeResCustService()
+DeleteVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06llof4" sourceRef="StartEvent_1bwmffk" targetRef="ScriptTask_0yk02h3" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_10o22u2" sourceRef="IntermediateCatchEvent_3" targetRef="doDeleteServiceInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo FinishProcess">
+ <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: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>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_112zjtp" name="QueryServiceInstance">
+ <bpmn2:outgoing>SequenceFlow_0jek18q</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="QueryServiceInstance" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_162gs5w" name="GoToDeleteBRG">
+ <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_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" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceId" target="parentServiceInstanceId" />
+ <camunda:in source="BRG_allottedResourceId" target="allottedResourceId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="globalCustomerId" target="globalCustomerId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_05cjs89</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0snq0kw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0i8bmrc" name="GoToVCPE-RESCUST">
+ <bpmn2:incoming>SequenceFlow_0zaircn</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="vCPE-RESCUST" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_04bw3vy" name="DeleteBRG">
+ <bpmn2:outgoing>SequenceFlow_09i2jj0</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="DeleteBRG" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0gw5gmo" name="Delete BRG AR?" default="SequenceFlow_03n4wb1">
+ <bpmn2:incoming>SequenceFlow_09i2jj0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05cjs89</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_03n4wb1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1hmeube">
+ <bpmn2:incoming>SequenceFlow_0snq0kw</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_03n4wb1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jjh8rv</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_12i24vc" name="Delete TXC AR?" default="SequenceFlow_0nk8vsb">
+ <bpmn2:incoming>SequenceFlow_0xgpd0u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0nk8vsb</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0npvfo3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0190r3n">
+ <bpmn2:incoming>SequenceFlow_0nk8vsb</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0et9p0i</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zaircn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_05cjs89" name="Yes" sourceRef="ExclusiveGateway_0gw5gmo" targetRef="CallActivity_1yap348">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DVRCS_BRG") == null || execution.getVariable("DVRCS_BRG") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0snq0kw" sourceRef="CallActivity_1yap348" targetRef="ExclusiveGateway_1hmeube" />
+ <bpmn2:sequenceFlow id="SequenceFlow_09i2jj0" sourceRef="IntermediateCatchEvent_04bw3vy" targetRef="ExclusiveGateway_0gw5gmo" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zaircn" sourceRef="ExclusiveGateway_0190r3n" targetRef="IntermediateThrowEvent_0i8bmrc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_03n4wb1" name="No" sourceRef="ExclusiveGateway_0gw5gmo" targetRef="ExclusiveGateway_1hmeube" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1jjh8rv" sourceRef="ExclusiveGateway_1hmeube" targetRef="IntermediateThrowEvent_19nq9li" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0nk8vsb" name="No" sourceRef="ExclusiveGateway_12i24vc" targetRef="ExclusiveGateway_0190r3n" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0npvfo3" name="Yes" sourceRef="ExclusiveGateway_12i24vc" targetRef="CallActivity_00g5q0n">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DVRCS_TunnelXConn") == null || execution.getVariable("DVRCS_TunnelXConn") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="CallActivity_00g5q0n" name="Delete TXC Allotted Resources&#10;" calledElement="DoDeleteAllottedResourceTXC">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceId" target="parentServiceInstanceId" />
+ <camunda:in source="TXC_allottedResourceId" target="allottedResourceId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="globalCustomerId" target="globalCustomerId" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0npvfo3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0et9p0i</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0et9p0i" sourceRef="CallActivity_00g5q0n" targetRef="ExclusiveGateway_0190r3n" />
+ <bpmn2:callActivity id="CallActivity_14j22w3" name="DoDelete&#10;VNF and Modules&#10;" calledElement="DoDeleteVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_128485i</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04fys47</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1csw2q1" name="Prepare to Delete VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yamcyn</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19cxgtm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_128485i</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService= new DeleteVcpeResCustService()
+DeleteVcpeResCustService.prepareVnfAndModulesDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1ks536f" name="GoToDeleteTXC">
+ <bpmn2:incoming>SequenceFlow_1lfph6u</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="DeleteTXC" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0hy32qu" name="StartVnfs">
+ <bpmn2:outgoing>SequenceFlow_1ofw0fi</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0io2vo5" name="Delete VNF?" default="SequenceFlow_0vq7f6b">
+ <bpmn2:incoming>SequenceFlow_1ofw0fi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yamcyn</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0vq7f6b</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1bm1vby">
+ <bpmn2:incoming>SequenceFlow_0vq7f6b</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_10scc5r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lfph6u</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_0wqfeak" name="Validate VNF delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04fys47</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o5cutr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+def DeleteVcpeResCustService= new DeleteVcpeResCustService()
+DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_14hjmu4" name="Delete Additional VNFs?" default="SequenceFlow_10scc5r">
+ <bpmn2:incoming>SequenceFlow_1o5cutr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19cxgtm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_10scc5r</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_128485i" sourceRef="ScriptTask_1csw2q1" targetRef="CallActivity_14j22w3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04fys47" sourceRef="CallActivity_14j22w3" targetRef="ScriptTask_0wqfeak" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yamcyn" name="Yes" sourceRef="ExclusiveGateway_0io2vo5" targetRef="ScriptTask_1csw2q1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DVRCS_vnfsCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19cxgtm" name="Yes" sourceRef="ExclusiveGateway_14hjmu4" targetRef="ScriptTask_1csw2q1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DVRCS_vnfsDeletedCount") < execution.getVariable("DVRCS_vnfsCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lfph6u" sourceRef="ExclusiveGateway_1bm1vby" targetRef="IntermediateThrowEvent_1ks536f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ofw0fi" sourceRef="IntermediateCatchEvent_0hy32qu" targetRef="ExclusiveGateway_0io2vo5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vq7f6b" name="No" sourceRef="ExclusiveGateway_0io2vo5" targetRef="ExclusiveGateway_1bm1vby" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10scc5r" name="No" sourceRef="ExclusiveGateway_14hjmu4" targetRef="ExclusiveGateway_1bm1vby" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1o5cutr" sourceRef="ScriptTask_0wqfeak" targetRef="ExclusiveGateway_14hjmu4" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_19nq9li" name="GoToStartVnfs">
+ <bpmn2:incoming>SequenceFlow_1jjh8rv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1svwsxy" name="DeleteTXC">
+ <bpmn2:outgoing>SequenceFlow_0xgpd0u</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="DeleteTXC" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xgpd0u" sourceRef="IntermediateCatchEvent_1svwsxy" targetRef="ExclusiveGateway_12i24vc" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVcpeResCustService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVCPE_startEvent">
+ <dc:Bounds x="96" y="121" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="162" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="285" y="99" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="132" y="139" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="139" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="174" y="139" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="476" y="1192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="285" y="1193" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="385" y="139" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="139" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="274" y="100" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="476" y="99" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="385" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="1232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="1217.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="DeleteVCPE_EndEvent">
+ <dc:Bounds x="1046" y="1213" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1054" y="1254" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337">
+ <di:waypoint xsi:type="dc:Point" x="576" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="636" y="1233" />
+ <di:waypoint xsi:type="dc:Point" x="636" y="1230" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="1230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="1231.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="686" y="1374" width="405" height="205" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="754" y="1479" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="1520" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="829" y="1457" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="982" y="1479" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1000" y="1520" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="790" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="829" y="1497" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="818" y="1497" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="929" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="962" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="962" y="1497" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="1497" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="977" y="1497" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doDeleteServiceInstance_CallActivity">
+ <dc:Bounds x="285" y="1009" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="576" y="139" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="139" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="124" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="803" y="1191" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="903" y="1230" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="1231" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="975" y="1215.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="100" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="92" y="1067" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="100" y="1216" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="1252" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="728" y="121" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="703" y="162" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="52" y="1375" width="598" height="203" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="123" y="1448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="1489" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="384" y="1426" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="539" y="1448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="1489" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="237" y="1426" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10o22u2_di" bpmnElement="SequenceFlow_10o22u2">
+ <di:waypoint xsi:type="dc:Point" x="136" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="1049" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="1034" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="136" y="1234" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="1233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="1218.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="337" y="1466" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="1466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="1451" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="484" y="1466" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="1466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="1451" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="508" y="1031" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_112zjtp_di" bpmnElement="IntermediateCatchEvent_112zjtp">
+ <dc:Bounds x="96" y="276" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="312" width="81" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_162gs5w_di" bpmnElement="IntermediateThrowEvent_162gs5w">
+ <dc:Bounds x="732" y="276" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="708" y="317" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="279" width="0" 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="732" y="294" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="279" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04ao07f_di" bpmnElement="SequenceFlow_04ao07f">
+ <di:waypoint xsi:type="dc:Point" x="385" y="1049" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="1049" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="198" y="1441" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1yap348_di" bpmnElement="CallActivity_1yap348">
+ <dc:Bounds x="346" y="356" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0i8bmrc_di" bpmnElement="IntermediateThrowEvent_0i8bmrc">
+ <dc:Bounds x="1046" y="479" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1023" y="520" width="85" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_04bw3vy_di" bpmnElement="IntermediateCatchEvent_04bw3vy">
+ <dc:Bounds x="96" y="489" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="87" y="525" width="56" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0gw5gmo_di" bpmnElement="ExclusiveGateway_0gw5gmo" isMarkerVisible="true">
+ <dc:Bounds x="235" y="482" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="294" y="495" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hmeube_di" bpmnElement="ExclusiveGateway_1hmeube" isMarkerVisible="true">
+ <dc:Bounds x="501" y="462" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526" y="512" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_12i24vc_di" bpmnElement="ExclusiveGateway_12i24vc" isMarkerVisible="true">
+ <dc:Bounds x="658" y="462" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715" y="475" width="84" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0190r3n_di" bpmnElement="ExclusiveGateway_0190r3n" isMarkerVisible="true">
+ <dc:Bounds x="911" y="472" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="522" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05cjs89_di" bpmnElement="SequenceFlow_05cjs89">
+ <di:waypoint xsi:type="dc:Point" x="260" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="260" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="396" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="267" y="429" width="17" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0snq0kw_di" bpmnElement="SequenceFlow_0snq0kw">
+ <di:waypoint xsi:type="dc:Point" x="446" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="463" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="381" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09i2jj0_di" bpmnElement="SequenceFlow_09i2jj0">
+ <di:waypoint xsi:type="dc:Point" x="132" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="235" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="184" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zaircn_di" bpmnElement="SequenceFlow_0zaircn">
+ <di:waypoint xsi:type="dc:Point" x="961" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="1004" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="1004" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="497" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1019" y="497" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03n4wb1_di" bpmnElement="SequenceFlow_03n4wb1">
+ <di:waypoint xsi:type="dc:Point" x="260" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="260" y="567" />
+ <di:waypoint xsi:type="dc:Point" x="526" y="567" />
+ <di:waypoint xsi:type="dc:Point" x="526" y="512" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="389" y="552" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jjh8rv_di" bpmnElement="SequenceFlow_1jjh8rv">
+ <di:waypoint xsi:type="dc:Point" x="551" y="487" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="487" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="562" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="518.5" y="472" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nk8vsb_di" bpmnElement="SequenceFlow_0nk8vsb">
+ <di:waypoint xsi:type="dc:Point" x="683" y="512" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="557" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="557" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="522" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="803" y="542" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0npvfo3_di" bpmnElement="SequenceFlow_0npvfo3">
+ <di:waypoint xsi:type="dc:Point" x="683" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="770" y="396" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="433" width="17" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_00g5q0n_di" bpmnElement="CallActivity_00g5q0n">
+ <dc:Bounds x="771" y="356" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0et9p0i_di" bpmnElement="SequenceFlow_0et9p0i">
+ <di:waypoint xsi:type="dc:Point" x="871" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="396" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="381" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_14j22w3_di" bpmnElement="CallActivity_14j22w3">
+ <dc:Bounds x="578" y="759" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1csw2q1_di" bpmnElement="ScriptTask_1csw2q1">
+ <dc:Bounds x="436" y="759" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ks536f_di" bpmnElement="IntermediateThrowEvent_1ks536f">
+ <dc:Bounds x="1059" y="848" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1033" y="889" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0hy32qu_di" bpmnElement="IntermediateCatchEvent_0hy32qu">
+ <dc:Bounds x="109" y="864" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="102" y="900" width="48" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0io2vo5_di" bpmnElement="ExclusiveGateway_0io2vo5" isMarkerVisible="true">
+ <dc:Bounds x="358" y="857" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="417" y="889" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1bm1vby_di" bpmnElement="ExclusiveGateway_1bm1vby" isMarkerVisible="true">
+ <dc:Bounds x="924" y="841" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="896" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0wqfeak_di" bpmnElement="ScriptTask_0wqfeak">
+ <dc:Bounds x="710" y="759" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_14hjmu4_di" bpmnElement="ExclusiveGateway_14hjmu4" isMarkerVisible="true">
+ <dc:Bounds x="851" y="774" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="818" y="832" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_128485i_di" bpmnElement="SequenceFlow_128485i">
+ <di:waypoint xsi:type="dc:Point" x="536" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="578" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="784" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04fys47_di" bpmnElement="SequenceFlow_04fys47">
+ <di:waypoint xsi:type="dc:Point" x="678" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649" y="774" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yamcyn_di" bpmnElement="SequenceFlow_1yamcyn">
+ <di:waypoint xsi:type="dc:Point" x="383" y="857" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="436" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="818" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19cxgtm_di" bpmnElement="SequenceFlow_19cxgtm">
+ <di:waypoint xsi:type="dc:Point" x="876" y="774" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="688" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="688" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="759" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="671" y="670" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lfph6u_di" bpmnElement="SequenceFlow_1lfph6u">
+ <di:waypoint xsi:type="dc:Point" x="974" y="866" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="866" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="971.5" y="845" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ofw0fi_di" bpmnElement="SequenceFlow_1ofw0fi">
+ <di:waypoint xsi:type="dc:Point" x="145" y="882" />
+ <di:waypoint xsi:type="dc:Point" x="358" y="882" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="207.5" y="857" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vq7f6b_di" bpmnElement="SequenceFlow_0vq7f6b">
+ <di:waypoint xsi:type="dc:Point" x="383" y="908" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="892" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="628" y="907" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_10scc5r_di" bpmnElement="SequenceFlow_10scc5r">
+ <di:waypoint xsi:type="dc:Point" x="901" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="917" y="784" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o5cutr_di" bpmnElement="SequenceFlow_1o5cutr">
+ <di:waypoint xsi:type="dc:Point" x="810" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="851" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786.5" y="784" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_19nq9li_di" bpmnElement="IntermediateThrowEvent_19nq9li">
+ <dc:Bounds x="558" y="562" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="537" y="603" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1svwsxy_di" bpmnElement="IntermediateCatchEvent_1svwsxy">
+ <dc:Bounds x="591" y="378" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="362" width="56" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xgpd0u_di" bpmnElement="SequenceFlow_0xgpd0u">
+ <di:waypoint xsi:type="dc:Point" x="609" y="414" />
+ <di:waypoint xsi:type="dc:Point" x="609" y="487" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="487" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="624" y="444.5" 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/process/DeleteVfModuleInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleInfra.bpmn
new file mode 100644
index 0000000000..bfe5e02b49
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleInfra.bpmn
@@ -0,0 +1,331 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="DeleteVfModuleInfra" name="DeleteVfModuleInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_7" name="DoDeleteVfModule (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.prepDoDeleteVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_6" name="DoDeleteVfModule" calledElement="DoDeleteVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DELVfModI_requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vfModuleId" target="vfModuleId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="DELVfModI_vfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="&#34;1610&#34;" target="sdncVersion" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="aLaCarte" target="aLaCarte" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DeleteVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.completionHandlerPrep(execution, 'DELVfModI_CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_5" />
+ <bpmn2:serviceTask id="ScriptTask_8" name="UpdateInfraRequest">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELVfModI_updateInfraRequest}</camunda:inputParameter>
+ <camunda:outputParameter name="DELVfModI_updateInfraRequestResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELVfModI_updateInfraRequestResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_10" />
+ <bpmn2:scriptTask id="ScriptTask_5" name="Update Infra Request (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.prepUpdateInfraRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_8" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvfm = new DeleteVfModuleInfra()
+dvfm.falloutHandlerPrep(execution, 'DELVfModI_FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="144" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="145" y="113" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="605" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="411" width="50" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="180" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="230" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="299" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="399" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="449" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">
+ <di:waypoint xsi:type="dc:Point" x="498" y="130" />
+ <di:waypoint xsi:type="dc:Point" x="498" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="169" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="449" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="549" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="605" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="723" y="186" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="149" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="149" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="299" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="249" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="65" y="536" width="565" height="241" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="129" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="98" y="671" width="98" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="209" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="165" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="309" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="325" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="533" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="612" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="671" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="704" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="648" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="377" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="399" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="356" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="477" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="533" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="373" y="456" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="299" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">
+ <di:waypoint xsi:type="dc:Point" x="249" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="230" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_182" bpmnElement="ScriptTask_5">
+ <dc:Bounds x="453" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_183" bpmnElement="ScriptTask_8">
+ <dc:Bounds x="598" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_182">
+ <di:waypoint xsi:type="dc:Point" x="399" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="453" y="230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="613" y="314" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_182" targetElement="_BPMNShape_ScriptTask_183">
+ <di:waypoint xsi:type="dc:Point" x="553" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="598" y="230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="230" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_183" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="647" y="270" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="304" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="304" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="348" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="280" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000000..b7ce608090
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,568 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DeleteVfModuleVolumeInfraV1" name="DeleteVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('preProcessRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:startEvent id="deleteNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="ScriptTask_callRestCloudRegion" />
+ <bpmn2:scriptTask id="ScriptTask_callRestCloudRegion" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def delVfModuleVol = new DeleteVfModuleVolumeInfraV1()
+delVfModuleVol.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="prepareVnfAdapterDelete_ScriptTask_1" name="Prepare Vnf Adapter Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareVnfAdapterDeleteRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="prepareVnfAdapterDelete_ScriptTask_1" targetRef="callVnfAdapterDeleteSubflow_CallActivity" />
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="TenantId Match?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ExclusiveGateway_3" targetRef="prepareVnfAdapterDelete_ScriptTask_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_tenantId") == execution.getVariable("DELVfModVol_volumeGroupTenantId")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_2" />
+ <bpmn2:callActivity id="callVnfAdapterDeleteSubflow_CallActivity" name="Call Vnf Adapter Delete subflow" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVfModVol_deleteVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DELVfModVol_deleteVnfAResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in variables="all" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callVnfAdapterDeleteSubflow_CallActivity" targetRef="ExclusiveGateway_2" />
+ <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Query AAI for Volume Group Info" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="callAAIQuery_scriptTask" targetRef="ExclusiveGateway_3" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Handle TenantId Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestCloudRegion" targetRef="ExclusiveGateway_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="is Cloud Region Ok?" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ExclusiveGateway_1" targetRef="callAAIQuery_scriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_isCloudRegionGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ExclusiveGateway_synResponseSent" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_synResponseSent" name="Sync response sent?" default="SequenceFlow_responseNotSent">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_responseNotSent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_responseSent</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Send Sync Ack Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_responseNotSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_responseNotSent" name="No" sourceRef="ExclusiveGateway_synResponseSent" targetRef="ScriptTask_4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_responseSent" name="Yes" sourceRef="ExclusiveGateway_synResponseSent" targetRef="prepareFalloutHandler_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DELVfModVol_syncResponseSent == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_responseSent</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareFalloutHandler', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity" />
+ <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="DELVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_4" targetRef="prepareFalloutHandler_ScriptTask" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareDBRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask" />
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Prepare Completion Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareCompletionHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_2" />
+ <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all" />
+ <camunda:out variables="all" />
+ <camunda:in source="DELVfModVol_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_3" />
+ <bpmn2:endEvent id="EndEvent_2" name="End">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_3" />
+ </bpmn2:endEvent>
+ <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
+ <camunda:inputParameter name="payload">${DELVfModVol_updateInfraRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELVfModVol_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTDeleteVolGrpId_ScriptTask" name="Call REST Delete AAI Vol Grp Id" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterCallOK</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('deleteVolGrpId', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTDeleteVolGrpId_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Is call to VNF Adapter OK?" default="SequenceFlow_vnfAdapterCallNotOK">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterCallOK</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterCallNotOK</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallOK" name="" sourceRef="ExclusiveGateway_2" targetRef="callRESTDeleteVolGrpId_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_6">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterCallNotOK</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallNotOK" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_6" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+ <dc:Bounds x="103" y="94" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="89" y="135" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="355" y="72" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="139" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="355" y="112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="116" y="12" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds x="864" y="72" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+ <dc:Bounds x="438" y="360" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="993" y="985" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="37" y="288" width="660" height="337" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="60" y="383" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="424" width="67" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+ <dc:Bounds x="288" y="360" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="993" y="877" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+ <dc:Bounds x="993" y="660" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+ <dc:Bounds x="993" y="769" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="455" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="112" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="496" y="72" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_255">
+ <di:waypoint xsi:type="dc:Point" x="96" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="118" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="118" y="400" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="400" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="99" y="401" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">
+ <di:waypoint xsi:type="dc:Point" x="388" y="400" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="400" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="413" y="400" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="849" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1258" y="857" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="957" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1289" y="898" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTDeleteVolGrpId_ScriptTask">
+ <dc:Bounds x="993" y="528" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="608" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="660" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1291" y="557" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="740" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="769" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1258" y="751" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_22" bpmnElement="callVnfAdapterDeleteSubflow_CallActivity">
+ <dc:Bounds x="993" y="300" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="prepareVnfAdapterDelete_ScriptTask_1">
+ <dc:Bounds x="993" y="180" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_CallActivity_22">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="260" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1112" y="280" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_22" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="380" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="1042" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="1042" y="422" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="415" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_1">
+ <dc:Bounds x="588" y="382" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="423" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_163">
+ <di:waypoint xsi:type="dc:Point" x="538" y="400" />
+ <di:waypoint xsi:type="dc:Point" x="588" y="400" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="400" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_167" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1025" y="1201" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="1242" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_241">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="1065" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="1093" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1258" y="1083" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="120" y="492" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="596" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="115" />
+ <di:waypoint xsi:type="dc:Point" x="636" y="115" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="613" y="112" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_203">
+ <di:waypoint xsi:type="dc:Point" x="964" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="1017" y="111" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1067" y="113" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_203" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="1017" y="86" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="984" y="60" width="102" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1104" y="72" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="1042" y="136" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="180" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1040" y="122" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_240">
+ <di:waypoint xsi:type="dc:Point" x="1067" y="111" />
+ <di:waypoint xsi:type="dc:Point" x="1085" y="111" />
+ <di:waypoint xsi:type="dc:Point" x="1085" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="1104" y="112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1216" y="113" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_5">
+ <dc:Bounds x="1242" y="95" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1260" y="136" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_240" targetElement="_BPMNShape_EndEvent_178">
+ <di:waypoint xsi:type="dc:Point" x="1204" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="1222" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="1222" y="113" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="113" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1220" y="113" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="993" y="1093" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_167">
+ <di:waypoint xsi:type="dc:Point" x="1043" y="1173" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="1201" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1040" y="1320" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="ScriptTask_callRestCloudRegion">
+ <dc:Bounds x="636" y="75" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="774" y="89" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="735" y="40" width="125" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">
+ <dc:Bounds x="781" y="170" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="799" y="211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_EndEvent_215">
+ <di:waypoint xsi:type="dc:Point" x="798" y="139" />
+ <di:waypoint xsi:type="dc:Point" x="798" y="153" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="153" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="170" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="166" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="736" y="115" />
+ <di:waypoint xsi:type="dc:Point" x="754" y="115" />
+ <di:waypoint xsi:type="dc:Point" x="754" y="114" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="114" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="752" y="114" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="824" y="114" />
+ <di:waypoint xsi:type="dc:Point" x="844" y="114" />
+ <di:waypoint xsi:type="dc:Point" x="844" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="864" y="112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="113" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1017" y="422" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960" y="477" width="164" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_vnfAdapterCallOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1042" y="472" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1040" y="500" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_6">
+ <dc:Bounds x="1168" y="430" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1186" y="471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_vnfAdapterCallNotOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_236">
+ <di:waypoint xsi:type="dc:Point" x="1067" y="447" />
+ <di:waypoint xsi:type="dc:Point" x="1117" y="447" />
+ <di:waypoint xsi:type="dc:Point" x="1117" y="448" />
+ <di:waypoint xsi:type="dc:Point" x="1168" y="448" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_synResponseSent" isMarkerVisible="true">
+ <dc:Bounds x="144" y="375" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="106" y="439" width="129" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_responseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_234">
+ <di:waypoint xsi:type="dc:Point" x="169" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="458" />
+ <di:waypoint xsi:type="dc:Point" x="170" y="458" />
+ <di:waypoint xsi:type="dc:Point" x="170" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="458" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_responseSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="194" y="400" />
+ <di:waypoint xsi:type="dc:Point" x="288" y="400" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="400" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="220" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="254" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="508" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="337" y="440" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="317" y="532" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn
new file mode 100644
index 0000000000..6092de6c79
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn
@@ -0,0 +1,353 @@
+<?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="_9MhrcHqVEea26OhQB97uCQ" 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="DeleteVnfInfra" name="DeleteVnfInfra" isExecutable="true">
+ <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:scriptTask id="sendSyncResponse" name="Send Sync Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16ikne0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="sendSyncResponse" />
+ <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="prepareFalloutHandlerRequest" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+
+String requestInfo = execution.getVariable("DELVI_requestInfo")
+ExceptionUtil ex = new ExceptionUtil()
+String falloutHandlerRequest = ex.processMainflowsBPMNException(execution, requestInfo)
+
+execution.setVariable("DELVI_falloutHandlerRequest", falloutHandlerRequest )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="prepareFalloutHandlerRequest" targetRef="callFalloutHandler" />
+ <bpmn2:callActivity id="callFalloutHandler" name="Fallout &#10;Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVI_falloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="DELVI_requestId" target="requestId" />
+ <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_3" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_37" />
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_94" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_2" targetRef="sendErrorResponse" />
+ <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendErrorResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="prepareFalloutHandlerRequest" />
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcess" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0slfgmy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="postProcess" targetRef="callCompletionHandler" />
+ <bpmn2:callActivity id="callCompletionHandler" name="Completion &#10;Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELVI_completionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="DELVI_requestId" target="mso-request-id" />
+ <camunda:in source="DELVI_serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="DeleteVnf" name="Delete VNF" calledElement="DoDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DELVI_vnfId" target="vnfId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00bhxtl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f56g06</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvxtnz">
+ <bpmn2:incoming>SequenceFlow_16ikne0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00o02cv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_00bhxtl</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16ikne0" sourceRef="sendSyncResponse" targetRef="ExclusiveGateway_1kvxtnz" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0r544im">
+ <bpmn2:incoming>SequenceFlow_1f56g06</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dy2xw0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0slfgmy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f56g06" sourceRef="DeleteVnf" targetRef="ExclusiveGateway_0r544im" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00o02cv" name="cascade delete" sourceRef="ExclusiveGateway_1kvxtnz" targetRef="Task_0ob25pp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVI_cascadeDelete")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0ob25pp" name="Delete VNF and Modules" calledElement="DoDeleteVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DELVI_requestId" target="msoRequestId" />
+ <camunda:in source="DELVI_vnfId" target="vnfId" />
+ <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="DELVI_cloudConfiguration" target="cloudConfiguration" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_00o02cv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0dy2xw0</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dy2xw0" sourceRef="Task_0ob25pp" targetRef="ExclusiveGateway_0r544im" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0slfgmy" sourceRef="ExclusiveGateway_0r544im" targetRef="postProcess" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00bhxtl" sourceRef="ExclusiveGateway_1kvxtnz" targetRef="DeleteVnf" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="90" y="210" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="108" y="251" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="216" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="126" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="164" y="228" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="sendSyncResponse">
+ <dc:Bounds x="364" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_313">
+ <di:waypoint xsi:type="dc:Point" x="316" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="228" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1074" y="210" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="251" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_34" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="132" y="442" width="589" height="207" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_80" bpmnElement="StartEvent_2">
+ <dc:Bounds x="144" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="162" y="569" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
+ <dc:Bounds x="672" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="690" y="569" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_66" bpmnElement="callFalloutHandler">
+ <dc:Bounds x="516" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_317" bpmnElement="sendErrorResponse">
+ <dc:Bounds x="240" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="prepareFalloutHandlerRequest">
+ <dc:Bounds x="377" y="506" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_80" targetElement="_BPMNShape_ScriptTask_317">
+ <di:waypoint xsi:type="dc:Point" x="180" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="240" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="201" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_317" targetElement="_BPMNShape_ScriptTask_318">
+ <di:waypoint xsi:type="dc:Point" x="340" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="353" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_CallActivity_66">
+ <di:waypoint xsi:type="dc:Point" x="477" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="491" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_66" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="616" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="546" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="271" y="696" width="312" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="300" y="757" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="318" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="516" y="757" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="378" y="735" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="336" y="775" />
+ <di:waypoint xsi:type="dc:Point" x="378" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="354" y="775" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="478" y="775" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="494" y="775" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="postProcess">
+ <dc:Bounds x="776" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_326" targetElement="_BPMNShape_CallActivity_71">
+ <di:waypoint xsi:type="dc:Point" x="876" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="932" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_71" bpmnElement="callCompletionHandler">
+ <dc:Bounds x="932" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_71" targetElement="_BPMNShape_EndEvent_237">
+ <di:waypoint xsi:type="dc:Point" x="1032" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="1074" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="DeleteVnf">
+ <dc:Bounds x="571" y="292" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvxtnz_di" bpmnElement="ExclusiveGateway_1kvxtnz" isMarkerVisible="true">
+ <dc:Bounds x="514" y="203" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="253" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ikne0_di" bpmnElement="SequenceFlow_16ikne0">
+ <di:waypoint xsi:type="dc:Point" x="464" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="514" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504" y="228" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0r544im_di" bpmnElement="ExclusiveGateway_0r544im" isMarkerVisible="true">
+ <dc:Bounds x="677" y="203" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="702" y="253" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f56g06_di" bpmnElement="SequenceFlow_1f56g06">
+ <di:waypoint xsi:type="dc:Point" x="671" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="253" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="307" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00o02cv_di" bpmnElement="SequenceFlow_00o02cv">
+ <di:waypoint xsi:type="dc:Point" x="539" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461" y="157" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_01wzpfb_di" bpmnElement="Task_0ob25pp">
+ <dc:Bounds x="571" y="78" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dy2xw0_di" bpmnElement="SequenceFlow_0dy2xw0">
+ <di:waypoint xsi:type="dc:Point" x="671" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="93" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0slfgmy_di" bpmnElement="SequenceFlow_0slfgmy">
+ <di:waypoint xsi:type="dc:Point" x="727" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="752" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00bhxtl_di" bpmnElement="SequenceFlow_00bhxtl">
+ <di:waypoint xsi:type="dc:Point" x="539" y="253" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="554" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ReplaceVnfInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ReplaceVnfInfra.bpmn
new file mode 100644
index 0000000000..6a157eb7c0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ReplaceVnfInfra.bpmn
@@ -0,0 +1,1815 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="ReplaceVnfInfra" name="ReplaceVnfInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y0jt4l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="Task_1rxiqe1" targetRef="ExclusiveGateway_045e1uz" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessRequest" targetRef="ScriptTask_1" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19rrss6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.completionHandlerPrep(execution, 'CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="Task_1cl8ayk" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ph6862</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.falloutHandlerPrep(execution, 'FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0msgw6c" sourceRef="Task_1cl8ayk" targetRef="Task_1xw8w6a" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0uhssvq" sourceRef="Task_1xw8w6a" targetRef="Task_0dc1x7g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ph6862" sourceRef="Task_0dc1x7g" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="Task_1cl8ayk" name="PreProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0msgw6c</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0dc1x7g" name="PostProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0uhssvq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ph6862</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_1xw8w6a" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0msgw6c</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0uhssvq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:callActivity id="ScriptTask_6" name="DoDeleteVnfAndModules" calledElement="DoDeleteVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="retainResources" target="retainResources" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19ba94v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gzzeru</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1w35ov3" sourceRef="Task_1gg76h7" targetRef="Task_1opcb4j" />
+ <bpmn2:callActivity id="Task_1gg76h7" name="Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0y0jt4l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w35ov3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_0iydw5o" />
+ <bpmn2:scriptTask id="Task_1opcb4j" name="Get VnfResourceDecomposition" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1w35ov3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_053qjfy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.getVnfResourceDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0y0jt4l" sourceRef="ScriptTask_1" targetRef="Task_1gg76h7" />
+ <bpmn2:scriptTask id="Task_1rxiqe1" name="Check If VNF Is In Maintenance in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16mo99z</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0jph3mt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.checkIfVnfInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0usxnlk" sourceRef="Task_0vy2zge" targetRef="ExclusiveGateway_0q323wc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1bkhs8m" name="no" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="Task_1dtbnuy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0gzzeru" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_0ulrq9g" />
+ <bpmn2:scriptTask id="Task_0ap39ka" name="Set VNF inMaintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0baosqi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1nodcf9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k3fx7p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.setVnfInMaintFlagInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1drglpt" name="Unset VNF In Maintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19lg15d</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0usoiza</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12mfil6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.setVnfInMaintFlagInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0vy2zge" name="Check If Physical Servers Are Locked in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14yy8v4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0usxnlk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.checkIfPserversInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xx8y1s" sourceRef="Task_1dtbnuy" targetRef="ExclusiveGateway_1slvyx2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a6pdza" sourceRef="Task_1fj63ov" targetRef="ExclusiveGateway_1ichg7h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13h26h9" sourceRef="Task_1cfkcss" targetRef="ExclusiveGateway_1etgtgi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1uno5rs" sourceRef="Task_1hdg951" targetRef="ExclusiveGateway_02tj4dw" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c79909" sourceRef="Task_1ca5ctq" targetRef="ExclusiveGateway_1gn5lab" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xfbwpi" sourceRef="Task_1sove95" targetRef="ExclusiveGateway_06mv93h" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0q323wc" name="Error on PServers Check?" default="SequenceFlow_16mo99z">
+ <bpmn2:incoming>SequenceFlow_0usxnlk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16mo99z</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12hm1ks</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16mo99z" name="no" sourceRef="ExclusiveGateway_0q323wc" targetRef="Task_1rxiqe1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045e1uz" name="Error On inMaintenance Check?" default="SequenceFlow_0baosqi">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0baosqi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0etr76r</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0baosqi" name="no" sourceRef="ExclusiveGateway_045e1uz" targetRef="Task_0ap39ka" />
+ <bpmn2:callActivity id="Task_0q5cdit" name="Rainy Day Handler" calledElement="RainyDayHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="nfRole" target="vnfType" />
+ <camunda:in source="currentActivity" target="currentActivity" />
+ <camunda:in source="workStep" target="workStep" />
+ <camunda:in source="failedActivity" target="failedActivity" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="errorText" target="errorText" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="handlingCode" target="disposition" />
+ <camunda:in source="requestorId" target="requestorId" />
+ <camunda:out source="taskId" target="taskId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1cezgw4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0v0u7mf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0v0u7mf" sourceRef="Task_0q5cdit" targetRef="ExclusiveGateway_0xlxgl0" />
+ <bpmn2:task id="Task_0zbogrm" name="Rollback Processing">
+ <bpmn2:incoming>SequenceFlow_1qr8msw</bpmn2:incoming>
+ </bpmn2:task>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vpd06n" name="Abort" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_1tg549h">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Abort"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qr8msw" name="Rollback" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_0zbogrm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Rollback"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ud5uwa" name="Eror on inMaintenance Set?" default="SequenceFlow_1bkhs8m">
+ <bpmn2:incoming>SequenceFlow_0k3fx7p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bkhs8m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11b00u2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3fx7p" sourceRef="Task_0ap39ka" targetRef="ExclusiveGateway_0ud5uwa" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1slvyx2" name="Error on VNF Lock?" default="SequenceFlow_0qy68ib">
+ <bpmn2:incoming>SequenceFlow_0xx8y1s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qy68ib</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ck3v34</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qy68ib" name="no" sourceRef="ExclusiveGateway_1slvyx2" targetRef="Task_1fj63ov" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1ichg7h" name="Error on Pre Health Check?" default="SequenceFlow_0q0qan8">
+ <bpmn2:incoming>SequenceFlow_0a6pdza</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q0qan8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_079nix0</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0q0qan8" name="no" sourceRef="ExclusiveGateway_1ichg7h" targetRef="Task_1cfkcss" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1etgtgi" name="Error on VNF Stop?" default="SequenceFlow_1c0vdki">
+ <bpmn2:incoming>SequenceFlow_13h26h9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c0vdki</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_032i8t0</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c0vdki" name="no" sourceRef="ExclusiveGateway_1etgtgi" targetRef="Task_0eae8go" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ulrq9g" name="Error on DoDeleteVnfAndNModules?" camunda:asyncBefore="true" default="SequenceFlow_0bxgny0">
+ <bpmn2:incoming>SequenceFlow_0gzzeru</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bxgny0</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1f0c5lj</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_04zwhw4" name="no" sourceRef="ExclusiveGateway_084iffr" targetRef="Task_1hdg951" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02tj4dw" name="Error on VNF Start?" default="SequenceFlow_162mm0m">
+ <bpmn2:incoming>SequenceFlow_1uno5rs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_162mm0m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17vwb2h</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_162mm0m" name="no" sourceRef="ExclusiveGateway_02tj4dw" targetRef="Task_1ca5ctq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gn5lab" name="Error on Post Health Check?" default="SequenceFlow_197t3qk">
+ <bpmn2:incoming>SequenceFlow_1c79909</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_197t3qk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ba08lt</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_197t3qk" name="no" sourceRef="ExclusiveGateway_1gn5lab" targetRef="Task_1sove95" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_06mv93h" name="Error on VNF Unlock?" default="SequenceFlow_19lg15d">
+ <bpmn2:incoming>SequenceFlow_1xfbwpi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19lg15d</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1akvi72</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19lg15d" name="no" sourceRef="ExclusiveGateway_06mv93h" targetRef="Task_1drglpt" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0l2z6wc" name="Erorr on inMaintenance Unset?" default="SequenceFlow_3">
+ <bpmn2:incoming>SequenceFlow_12mfil6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1sdol24</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_12mfil6" sourceRef="Task_1drglpt" targetRef="ExclusiveGateway_0l2z6wc" />
+ <bpmn2:scriptTask id="Task_1tg549h" name="Abort Processing" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vpd06n</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_051zp79</bpmn2:incoming>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.abortProcessing(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0xlxgl0" name="Check Disposition">
+ <bpmn2:incoming>SequenceFlow_0v0u7mf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vpd06n</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qr8msw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05gpym3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y82zzx" name="Which step to skip?" default="SequenceFlow_051zp79">
+ <bpmn2:incoming>SequenceFlow_05gpym3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_051zp79</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ei7at5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0kg02xg</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1i6p53b</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1yy7o24</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0sqmtpl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1shdmrj</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1v1i5w4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1h8rscx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1xzq6jb</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_165q14c</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0wp1a6g</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0vymfh9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_05gpym3" name="Skip" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Skip"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19ba94v" sourceRef="Task_0eae8go" targetRef="ScriptTask_6" />
+ <bpmn2:scriptTask id="Task_0eae8go" name="Prepare DoDeleteVnfAndModules" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1c0vdki</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0aldwvz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19ba94v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.prepDoDeleteVnfAndModules(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_040hi91" name="Prepare DoCreateVnfAndModules" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bxgny0</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_111z6w4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qm0ygo</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.prepDoCreateVnfAndModules(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_15hpowt" name="DoCreateVnfAndModules" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="platform" target="platform" />
+ <camunda:in source="lineOfBusiness" target="lineOfBusiness" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qm0ygo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0he2w4b</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_084iffr" name="Error on DoCreateVnfModules?" default="SequenceFlow_04zwhw4">
+ <bpmn2:incoming>SequenceFlow_0he2w4b</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04zwhw4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0pfvulx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bxgny0" name="no" sourceRef="ExclusiveGateway_0ulrq9g" targetRef="Task_040hi91" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qm0ygo" sourceRef="Task_040hi91" targetRef="Task_15hpowt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0he2w4b" sourceRef="Task_15hpowt" targetRef="ExclusiveGateway_084iffr" />
+ <bpmn2:sequenceFlow id="SequenceFlow_051zp79" name="" sourceRef="ExclusiveGateway_0y82zzx" targetRef="Task_1tg549h" />
+ <bpmn2:callActivity id="Task_1dtbnuy" name="Call APP-C VNF Lock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionLock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bkhs8m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1qfjlt7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xx8y1s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1fj63ov" name="Call APP-C Health Check" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qy68ib</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0x7iupc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a6pdza</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1cfkcss" name="Call APP-C VNF Graceful Stop" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStop" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="aicIdentity" target="aicIdentity" />
+ <camunda:out source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0q0qan8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0hp0w6k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13h26h9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1hdg951" name="Call APP-C VNF Start" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStart" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="aicIdentity" target="aicIdentity" />
+ <camunda:out source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04zwhw4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1lrbndo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uno5rs</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1ca5ctq" name="Call APP-C Health Check" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex1" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_162mm0m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14mblvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c79909</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_11iqe6n" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_12hm1ks</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_16f09ke" name="To inMaintenance Check">
+ <bpmn2:outgoing>SequenceFlow_0jph3mt</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Check" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mtokuy" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0etr76r</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1h8oi7w" name="To inMaintenance Set">
+ <bpmn2:outgoing>SequenceFlow_1nodcf9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Set" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0pwcatt" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_11b00u2</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12hm1ks" name="yes" sourceRef="ExclusiveGateway_0q323wc" targetRef="IntermediateThrowEvent_11iqe6n">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jph3mt" sourceRef="IntermediateThrowEvent_16f09ke" targetRef="Task_1rxiqe1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0etr76r" name="yes" sourceRef="ExclusiveGateway_045e1uz" targetRef="IntermediateThrowEvent_1mtokuy">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1nodcf9" sourceRef="IntermediateThrowEvent_1h8oi7w" targetRef="Task_0ap39ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_11b00u2" name="yes" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="IntermediateThrowEvent_0pwcatt">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1w8dvxw" name="To VNF Lock">
+ <bpmn2:outgoing>SequenceFlow_1qfjlt7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0mqqagp" name="To Rainy Day Hnadling">
+ <bpmn2:incoming>SequenceFlow_1ck3v34</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0vyfpwj" name="To Health PreCheck">
+ <bpmn2:outgoing>SequenceFlow_0x7iupc</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_12187dz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_079nix0</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0c7rese" name="To VNF Stop">
+ <bpmn2:outgoing>SequenceFlow_0hp0w6k</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Stop" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_18grbwz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_032i8t0</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qfjlt7" sourceRef="IntermediateThrowEvent_1w8dvxw" targetRef="Task_1dtbnuy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ck3v34" name="yes" sourceRef="ExclusiveGateway_1slvyx2" targetRef="IntermediateThrowEvent_0mqqagp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0x7iupc" sourceRef="IntermediateThrowEvent_0vyfpwj" targetRef="Task_1fj63ov" />
+ <bpmn2:sequenceFlow id="SequenceFlow_079nix0" name="yes" sourceRef="ExclusiveGateway_1ichg7h" targetRef="IntermediateThrowEvent_12187dz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0hp0w6k" sourceRef="IntermediateThrowEvent_0c7rese" targetRef="Task_1cfkcss" />
+ <bpmn2:sequenceFlow id="SequenceFlow_032i8t0" name="yes" sourceRef="ExclusiveGateway_1etgtgi" targetRef="IntermediateThrowEvent_18grbwz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0r8kzqa" name="To DoDeleteVnfAndModules">
+ <bpmn2:outgoing>SequenceFlow_0aldwvz</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To DoDeleteVnfAndModules" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_169eg4j" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1f0c5lj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0tenxiw" name="To DoCreateVnfAndModules">
+ <bpmn2:outgoing>SequenceFlow_111z6w4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To DoCreateVnfAndModules" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mocak0" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0pfvulx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0aldwvz" sourceRef="IntermediateThrowEvent_0r8kzqa" targetRef="Task_0eae8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1f0c5lj" name="yes" sourceRef="ExclusiveGateway_0ulrq9g" targetRef="IntermediateThrowEvent_169eg4j">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_111z6w4" sourceRef="IntermediateThrowEvent_0tenxiw" targetRef="Task_040hi91" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0pfvulx" name="yes" sourceRef="ExclusiveGateway_084iffr" targetRef="IntermediateThrowEvent_1mocak0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_1sove95" name="Call APP-C VNF Unlock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUnlock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_197t3qk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18e0jz0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xfbwpi</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_15yev7i" name="To VNF Start">
+ <bpmn2:outgoing>SequenceFlow_1lrbndo</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Start" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0osnva5" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_17vwb2h</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0gluaxf" name="To Health PostCheck">
+ <bpmn2:outgoing>SequenceFlow_14mblvp</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1chu5lh" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0ba08lt</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0p7wh09" name="To VNF Unlock">
+ <bpmn2:outgoing>SequenceFlow_18e0jz0</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0uh8zti" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1akvi72</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1dei2gz" name="To inMaintenance Unset">
+ <bpmn2:outgoing>SequenceFlow_0usoiza</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Unset" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0fobhuu" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1sdol24</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lrbndo" sourceRef="IntermediateThrowEvent_15yev7i" targetRef="Task_1hdg951" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17vwb2h" name="yes" sourceRef="ExclusiveGateway_02tj4dw" targetRef="IntermediateThrowEvent_0osnva5">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_14mblvp" sourceRef="IntermediateThrowEvent_0gluaxf" targetRef="Task_1ca5ctq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ba08lt" name="yes" sourceRef="ExclusiveGateway_1gn5lab" targetRef="IntermediateThrowEvent_1chu5lh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_18e0jz0" sourceRef="IntermediateThrowEvent_0p7wh09" targetRef="Task_1sove95" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1akvi72" name="yes" sourceRef="ExclusiveGateway_06mv93h" targetRef="IntermediateThrowEvent_0uh8zti">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0usoiza" sourceRef="IntermediateThrowEvent_1dei2gz" targetRef="Task_1drglpt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1sdol24" name="yes" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="IntermediateThrowEvent_0fobhuu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1lc72r4" name="To Completion Handler Prep">
+ <bpmn2:outgoing>SequenceFlow_19rrss6</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19rrss6" sourceRef="IntermediateThrowEvent_1lc72r4" targetRef="ScriptTask_10" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0a9mn5c" name="To Rainy Day Handling">
+ <bpmn2:outgoing>SequenceFlow_1cezgw4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cezgw4" sourceRef="IntermediateThrowEvent_0a9mn5c" targetRef="Task_0q5cdit" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0x4bho9" name="To inMaintenance Check">
+ <bpmn2:incoming>SequenceFlow_1ei7at5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Check" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0jervei" name="To inMaintenance Set">
+ <bpmn2:incoming>SequenceFlow_0kg02xg</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Set" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1vju4tj" name="To VNF Lock">
+ <bpmn2:incoming>SequenceFlow_1i6p53b</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1fzppfz" name="To Health PreCheck">
+ <bpmn2:incoming>SequenceFlow_1yy7o24</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1e0qowf" name="To VNF Stop">
+ <bpmn2:incoming>SequenceFlow_0sqmtpl</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Stop" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1v93roi" name="To DoDeleteVnfAndModules">
+ <bpmn2:incoming>SequenceFlow_1shdmrj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To DoDeleteVnfAndModules" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_04a1dfz" name="To DoCreateVnfAndModules">
+ <bpmn2:incoming>SequenceFlow_1v1i5w4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To DoCreateVnfAndModules" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_151z73b" name="To VNF Start">
+ <bpmn2:incoming>SequenceFlow_1h8rscx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Start" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_10bre7q" name="To Health PostCheck">
+ <bpmn2:incoming>SequenceFlow_1xzq6jb</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1fl945a" name="To VNF Unlock">
+ <bpmn2:incoming>SequenceFlow_165q14c</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1lljtoh" name="To inMaintenance Unset">
+ <bpmn2:incoming>SequenceFlow_0wp1a6g</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Unset" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0sub2cf" name="To Completion Handler Prep">
+ <bpmn2:incoming>SequenceFlow_0vymfh9</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ei7at5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0x4bho9">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "checkIfPserversInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0kg02xg" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0jervei">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "checkIfVnfInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i6p53b" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1vju4tj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "setVnfInMaintFlagInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1yy7o24" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1fzppfz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Lock"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sqmtpl" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1e0qowf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "HealthCheck0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1shdmrj" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1v93roi">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Stop"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1v1i5w4" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_04a1dfz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "doDeleteVnfAndModules"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h8rscx" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_151z73b">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "doCreateVnfAndModules"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xzq6jb" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_10bre7q">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Start"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_165q14c" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1fl945a">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "HealthCheck1"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0wp1a6g" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1lljtoh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Unlock"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vymfh9" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0sub2cf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_14yy8v4" sourceRef="Task_0iydw5o" targetRef="Task_0vy2zge" />
+ <bpmn2:scriptTask id="Task_0iydw5o" name="Query A&#38;AI for VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14yy8v4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new ReplaceVnfInfra()
+uvfm.queryAAIForVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ReplaceVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="97" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="113" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="599" y="1249" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="1290" width="38" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="133" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="209" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="309" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="373" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="525" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="434" y="1227" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="534" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="599" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="1267" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="134" y="1227" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="284" y="1227" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="234" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="284" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="1509" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="88" y="1467" width="565" height="241" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="152" y="1561" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131" y="1602" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="232" y="1539" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="188" y="1579" />
+ <di:waypoint xsi:type="dc:Point" x="232" y="1579" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235" y="1879" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="332" y="1579" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="1579" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="1579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="556" y="1561" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="1602" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="635" y="1561" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="653" y="1602" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="729" y="1561" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="1602" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="671" y="1579" />
+ <di:waypoint xsi:type="dc:Point" x="729" y="1579" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="700" y="1564" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="400" y="1539" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="384" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="1509" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="500" y="1579" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="1579" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="1639" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="305" y="695" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="1275" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="1275" y="1171" />
+ <di:waypoint xsi:type="dc:Point" x="96" y="1171" />
+ <di:waypoint xsi:type="dc:Point" x="96" y="1267" />
+ <di:waypoint xsi:type="dc:Point" x="134" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1218" y="964.4017408047539" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w35ov3_di" bpmnElement="SequenceFlow_1w35ov3">
+ <di:waypoint xsi:type="dc:Point" x="655" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0qfx7sz_di" bpmnElement="Task_1gg76h7">
+ <dc:Bounds x="555" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_053qjfy_di" bpmnElement="SequenceFlow_053qjfy">
+ <di:waypoint xsi:type="dc:Point" x="818" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="863" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08xzuox_di" bpmnElement="Task_1opcb4j">
+ <dc:Bounds x="718" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y0jt4l_di" bpmnElement="SequenceFlow_0y0jt4l">
+ <di:waypoint xsi:type="dc:Point" x="473" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="514" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19pf9z8_di" bpmnElement="Task_1rxiqe1">
+ <dc:Bounds x="425" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0usxnlk_di" bpmnElement="SequenceFlow_0usxnlk">
+ <di:waypoint xsi:type="dc:Point" x="239" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bkhs8m_di" bpmnElement="SequenceFlow_1bkhs8m">
+ <di:waypoint xsi:type="dc:Point" x="921" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="988" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="988" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951" y="208.69353020889844" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gzzeru_di" bpmnElement="SequenceFlow_0gzzeru">
+ <di:waypoint xsi:type="dc:Point" x="405" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="435" y="720" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wa4zya_di" bpmnElement="Task_0ap39ka">
+ <dc:Bounds x="718" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sgm9bu_di" bpmnElement="Task_1drglpt">
+ <dc:Bounds x="982" y="949" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16jtt5t_di" bpmnElement="Task_0vy2zge">
+ <dc:Bounds x="139" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xx8y1s_di" bpmnElement="SequenceFlow_0xx8y1s">
+ <di:waypoint xsi:type="dc:Point" x="239" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="475" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a6pdza_di" bpmnElement="SequenceFlow_0a6pdza">
+ <di:waypoint xsi:type="dc:Point" x="525" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="475" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13h26h9_di" bpmnElement="SequenceFlow_13h26h9">
+ <di:waypoint xsi:type="dc:Point" x="818" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="845" y="475" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uno5rs_di" bpmnElement="SequenceFlow_1uno5rs">
+ <di:waypoint xsi:type="dc:Point" x="259" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="310" y="989" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c79909_di" bpmnElement="SequenceFlow_1c79909">
+ <di:waypoint xsi:type="dc:Point" x="539" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="570" y="974" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xfbwpi_di" bpmnElement="SequenceFlow_1xfbwpi">
+ <di:waypoint xsi:type="dc:Point" x="818" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="880" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="849" y="974" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0q323wc_di" bpmnElement="ExclusiveGateway_0q323wc" isMarkerVisible="true">
+ <dc:Bounds x="291.803" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="170" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16mo99z_di" bpmnElement="SequenceFlow_16mo99z">
+ <di:waypoint xsi:type="dc:Point" x="342" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="373" y="213" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045e1uz_di" bpmnElement="ExclusiveGateway_045e1uz" isMarkerVisible="true">
+ <dc:Bounds x="601" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="161" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0baosqi_di" bpmnElement="SequenceFlow_0baosqi">
+ <di:waypoint xsi:type="dc:Point" x="651" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="675" y="214" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1k5n5d1_di" bpmnElement="Task_0q5cdit">
+ <dc:Bounds x="1173" y="609" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v0u7mf_di" bpmnElement="SequenceFlow_0v0u7mf">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="649" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1294" y="634" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Task_0zbogrm_di" bpmnElement="Task_0zbogrm">
+ <dc:Bounds x="1290" y="768" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vpd06n_di" bpmnElement="SequenceFlow_0vpd06n">
+ <di:waypoint xsi:type="dc:Point" x="1340" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="502" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1351" y="556.9998593756898" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qr8msw_di" bpmnElement="SequenceFlow_1qr8msw">
+ <di:waypoint xsi:type="dc:Point" x="1340" y="674" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="722" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="722" />
+ <di:waypoint xsi:type="dc:Point" x="1340" y="768" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1344" y="718.1219512195122" width="42" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ud5uwa_di" bpmnElement="ExclusiveGateway_0ud5uwa" isMarkerVisible="true">
+ <dc:Bounds x="871.1194471865745" y="211.86673247778873" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="859" y="164" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3fx7p_di" bpmnElement="SequenceFlow_0k3fx7p">
+ <di:waypoint xsi:type="dc:Point" x="818" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="845" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1slvyx2_di" bpmnElement="ExclusiveGateway_1slvyx2" isMarkerVisible="true">
+ <dc:Bounds x="292" y="465" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="283" y="428" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qy68ib_di" bpmnElement="SequenceFlow_0qy68ib">
+ <di:waypoint xsi:type="dc:Point" x="342" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="378" y="475" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ichg7h_di" bpmnElement="ExclusiveGateway_1ichg7h" isMarkerVisible="true">
+ <dc:Bounds x="601" y="465" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="428" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q0qan8_di" bpmnElement="SequenceFlow_0q0qan8">
+ <di:waypoint xsi:type="dc:Point" x="651" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="680" y="475" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1etgtgi_di" bpmnElement="ExclusiveGateway_1etgtgi" isMarkerVisible="true">
+ <dc:Bounds x="871" y="465" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="862" y="430" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c0vdki_di" bpmnElement="SequenceFlow_1c0vdki">
+ <di:waypoint xsi:type="dc:Point" x="921" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="643" />
+ <di:waypoint xsi:type="dc:Point" x="96" y="643" />
+ <di:waypoint xsi:type="dc:Point" x="96" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="949" y="466" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ulrq9g_di" bpmnElement="ExclusiveGateway_0ulrq9g" isMarkerVisible="true">
+ <dc:Bounds x="464" y="710" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="445" y="660" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04zwhw4_di" bpmnElement="SequenceFlow_04zwhw4">
+ <di:waypoint xsi:type="dc:Point" x="921" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="1004" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="1004" y="900" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="900" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="953" y="712" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02tj4dw_di" bpmnElement="ExclusiveGateway_02tj4dw" isMarkerVisible="true">
+ <dc:Bounds x="330" y="964" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="923" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_162mm0m_di" bpmnElement="SequenceFlow_162mm0m">
+ <di:waypoint xsi:type="dc:Point" x="380" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="410" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="410" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="439" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="402" y="966.0361567790148" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gn5lab_di" bpmnElement="ExclusiveGateway_1gn5lab" isMarkerVisible="true">
+ <dc:Bounds x="601" y="964" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="927" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_197t3qk_di" bpmnElement="SequenceFlow_197t3qk">
+ <di:waypoint xsi:type="dc:Point" x="651" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="963.1314236383614" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06mv93h_di" bpmnElement="ExclusiveGateway_06mv93h" isMarkerVisible="true">
+ <dc:Bounds x="880" y="964" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="928" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19lg15d_di" bpmnElement="SequenceFlow_19lg15d">
+ <di:waypoint xsi:type="dc:Point" x="930" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="953" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="953" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="948" y="964.6410256410256" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0l2z6wc_di" bpmnElement="ExclusiveGateway_0l2z6wc" isMarkerVisible="true">
+ <dc:Bounds x="1131" y="964" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1119" y="916" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12mfil6_di" bpmnElement="SequenceFlow_12mfil6">
+ <di:waypoint xsi:type="dc:Point" x="1082" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="989" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1107" y="974" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lb0lk5_di" bpmnElement="Task_1tg549h">
+ <dc:Bounds x="1290" y="422" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gmvi7n_di" bpmnElement="ExclusiveGateway_0xlxgl0" isMarkerVisible="true">
+ <dc:Bounds x="1315" y="624" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1296" y="596" width="88" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y82zzx_di" bpmnElement="ExclusiveGateway_0y82zzx" isMarkerVisible="true">
+ <dc:Bounds x="1468" y="624" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1424" y="593" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05gpym3_di" bpmnElement="SequenceFlow_05gpym3">
+ <di:waypoint xsi:type="dc:Point" x="1365" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1417" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1417" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1468" y="649" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="626" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ba94v_di" bpmnElement="SequenceFlow_19ba94v">
+ <di:waypoint xsi:type="dc:Point" x="239" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="272" y="720" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0rqgdju_di" bpmnElement="Task_0eae8go">
+ <dc:Bounds x="139" y="695" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_13zzxzd_di" bpmnElement="Task_040hi91">
+ <dc:Bounds x="567" y="695" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1qpajth_di" bpmnElement="Task_15hpowt">
+ <dc:Bounds x="726" y="695" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_084iffr_di" bpmnElement="ExclusiveGateway_084iffr" isMarkerVisible="true">
+ <dc:Bounds x="871" y="710" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="854" y="659" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bxgny0_di" bpmnElement="SequenceFlow_0bxgny0">
+ <di:waypoint xsi:type="dc:Point" x="514" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="567" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="535" y="710" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm0ygo_di" bpmnElement="SequenceFlow_1qm0ygo">
+ <di:waypoint xsi:type="dc:Point" x="667" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="697" y="720" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0he2w4b_di" bpmnElement="SequenceFlow_0he2w4b">
+ <di:waypoint xsi:type="dc:Point" x="826" y="735" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="735" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="849" y="720" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_051zp79_di" bpmnElement="SequenceFlow_051zp79">
+ <di:waypoint xsi:type="dc:Point" x="1493" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="1493" y="462" />
+ <di:waypoint xsi:type="dc:Point" x="1390" y="462" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1508" y="543" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1r1hua0_di" bpmnElement="Task_1dtbnuy">
+ <dc:Bounds x="139" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ce9xg6_di" bpmnElement="Task_1fj63ov">
+ <dc:Bounds x="425" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0iib61o_di" bpmnElement="Task_1cfkcss">
+ <dc:Bounds x="718" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1xyvwmi_di" bpmnElement="Task_1hdg951">
+ <dc:Bounds x="159" y="949" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sghju2_di" bpmnElement="Task_1ca5ctq">
+ <dc:Bounds x="439" y="949" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1qrk3gs_di" bpmnElement="IntermediateThrowEvent_11iqe6n">
+ <dc:Bounds x="299" y="325" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="361" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_144j68y_di" bpmnElement="IntermediateThrowEvent_16f09ke">
+ <dc:Bounds x="457" y="325" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="432" y="361" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1rpfbr6_di" bpmnElement="IntermediateThrowEvent_1mtokuy">
+ <dc:Bounds x="608" y="325" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="361" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1k1fpg2_di" bpmnElement="IntermediateThrowEvent_1h8oi7w">
+ <dc:Bounds x="750" y="325" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="724" y="361" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_04ykz47_di" bpmnElement="IntermediateThrowEvent_0pwcatt">
+ <dc:Bounds x="878" y="325" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="361" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12hm1ks_di" bpmnElement="SequenceFlow_12hm1ks">
+ <di:waypoint xsi:type="dc:Point" x="317" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="325" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="283.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jph3mt_di" bpmnElement="SequenceFlow_0jph3mt">
+ <di:waypoint xsi:type="dc:Point" x="475" y="325" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="291" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0etr76r_di" bpmnElement="SequenceFlow_0etr76r">
+ <di:waypoint xsi:type="dc:Point" x="626" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="325" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="283.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nodcf9_di" bpmnElement="SequenceFlow_1nodcf9">
+ <di:waypoint xsi:type="dc:Point" x="768" y="325" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="783" y="301" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11b00u2_di" bpmnElement="SequenceFlow_11b00u2">
+ <di:waypoint xsi:type="dc:Point" x="896" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="896" y="325" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="283.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0u1c12l_di" bpmnElement="IntermediateThrowEvent_1w8dvxw">
+ <dc:Bounds x="171" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="158" y="606.255" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1w4kuh4_di" bpmnElement="IntermediateThrowEvent_0mqqagp">
+ <dc:Bounds x="299" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="607" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_15qyo7b_di" bpmnElement="IntermediateThrowEvent_0vyfpwj">
+ <dc:Bounds x="457" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="450" y="607" width="50" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0gui5k9_di" bpmnElement="IntermediateThrowEvent_12187dz">
+ <dc:Bounds x="608" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="607" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1aj9q5v_di" bpmnElement="IntermediateThrowEvent_0c7rese">
+ <dc:Bounds x="750" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="607" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0glqip0_di" bpmnElement="IntermediateThrowEvent_18grbwz">
+ <dc:Bounds x="878" y="571" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="607" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qfjlt7_di" bpmnElement="SequenceFlow_1qfjlt7">
+ <di:waypoint xsi:type="dc:Point" x="189" y="571" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="551" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ck3v34_di" bpmnElement="SequenceFlow_1ck3v34">
+ <di:waypoint xsi:type="dc:Point" x="317" y="515" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="571" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="533" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x7iupc_di" bpmnElement="SequenceFlow_0x7iupc">
+ <di:waypoint xsi:type="dc:Point" x="475" y="571" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="551" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_079nix0_di" bpmnElement="SequenceFlow_079nix0">
+ <di:waypoint xsi:type="dc:Point" x="626" y="515" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="571" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="533" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hp0w6k_di" bpmnElement="SequenceFlow_0hp0w6k">
+ <di:waypoint xsi:type="dc:Point" x="768" y="571" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="551" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="783" y="551" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_032i8t0_di" bpmnElement="SequenceFlow_032i8t0">
+ <di:waypoint xsi:type="dc:Point" x="896" y="515" />
+ <di:waypoint xsi:type="dc:Point" x="896" y="571" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="533" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_11xo4q3_di" bpmnElement="IntermediateThrowEvent_0r8kzqa">
+ <dc:Bounds x="171" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="144" y="853.255" width="90" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0u4mlb8_di" bpmnElement="IntermediateThrowEvent_169eg4j">
+ <dc:Bounds x="471" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="454" y="854" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1pdmno6_di" bpmnElement="IntermediateThrowEvent_0tenxiw">
+ <dc:Bounds x="599" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="576" y="854" width="81" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_07n59qs_di" bpmnElement="IntermediateThrowEvent_1mocak0">
+ <dc:Bounds x="878" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="854" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aldwvz_di" bpmnElement="SequenceFlow_0aldwvz">
+ <di:waypoint xsi:type="dc:Point" x="189" y="818" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="796.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f0c5lj_di" bpmnElement="SequenceFlow_1f0c5lj">
+ <di:waypoint xsi:type="dc:Point" x="489" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="818" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="779.6376811594203" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_111z6w4_di" bpmnElement="SequenceFlow_111z6w4">
+ <di:waypoint xsi:type="dc:Point" x="617" y="818" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="796.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pfvulx_di" bpmnElement="SequenceFlow_0pfvulx">
+ <di:waypoint xsi:type="dc:Point" x="896" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="896" y="818" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="779.6376811594203" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0xi77mq_di" bpmnElement="Task_1sove95">
+ <dc:Bounds x="718" y="949" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0t5q3v6_di" bpmnElement="IntermediateThrowEvent_15yev7i">
+ <dc:Bounds x="191" y="1089" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178" y="1124.255" width="61" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0yid2k4_di" bpmnElement="IntermediateThrowEvent_0osnva5">
+ <dc:Bounds x="337" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="320" y="1124" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rlfyt9_di" bpmnElement="IntermediateThrowEvent_0gluaxf">
+ <dc:Bounds x="471" y="1089" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462" y="1125" width="54" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1sk17yj_di" bpmnElement="IntermediateThrowEvent_1chu5lh">
+ <dc:Bounds x="608" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="1124" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0nmz72e_di" bpmnElement="IntermediateThrowEvent_0p7wh09">
+ <dc:Bounds x="750" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="731" y="1124" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1okzqsq_di" bpmnElement="IntermediateThrowEvent_0uh8zti">
+ <dc:Bounds x="887" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="870" y="1124" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1944cw1_di" bpmnElement="IntermediateThrowEvent_1dei2gz">
+ <dc:Bounds x="1014" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="989" y="1124" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0ynnoam_di" bpmnElement="IntermediateThrowEvent_0fobhuu">
+ <dc:Bounds x="1138" y="1088" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1121" y="1124" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lrbndo_di" bpmnElement="SequenceFlow_1lrbndo">
+ <di:waypoint xsi:type="dc:Point" x="209" y="1089" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="1029" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="1049" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17vwb2h_di" bpmnElement="SequenceFlow_17vwb2h">
+ <di:waypoint xsi:type="dc:Point" x="355" y="1014" />
+ <di:waypoint xsi:type="dc:Point" x="355" y="1088" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="1041" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14mblvp_di" bpmnElement="SequenceFlow_14mblvp">
+ <di:waypoint xsi:type="dc:Point" x="489" y="1089" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="1059" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="1059" />
+ <di:waypoint xsi:type="dc:Point" x="489" y="1029" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504" y="1059" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ba08lt_di" bpmnElement="SequenceFlow_0ba08lt">
+ <di:waypoint xsi:type="dc:Point" x="626" y="1014" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="1088" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="1041" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18e0jz0_di" bpmnElement="SequenceFlow_18e0jz0">
+ <di:waypoint xsi:type="dc:Point" x="768" y="1088" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="1029" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="783" y="1048.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1akvi72_di" bpmnElement="SequenceFlow_1akvi72">
+ <di:waypoint xsi:type="dc:Point" x="905" y="1014" />
+ <di:waypoint xsi:type="dc:Point" x="905" y="1088" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="911" y="1041" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0usoiza_di" bpmnElement="SequenceFlow_0usoiza">
+ <di:waypoint xsi:type="dc:Point" x="1032" y="1088" />
+ <di:waypoint xsi:type="dc:Point" x="1032" y="1029" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1047" y="1048.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sdol24_di" bpmnElement="SequenceFlow_1sdol24">
+ <di:waypoint xsi:type="dc:Point" x="1156" y="1014" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="1088" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1162" y="1041" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0pacmdm_di" bpmnElement="IntermediateThrowEvent_1lc72r4">
+ <dc:Bounds x="166" y="1366" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="147" y="1401.255" width="73" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19rrss6_di" bpmnElement="SequenceFlow_19rrss6">
+ <di:waypoint xsi:type="dc:Point" x="184" y="1366" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="1307" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="199" y="1326.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0123x9c_di" bpmnElement="IntermediateThrowEvent_0a9mn5c">
+ <dc:Bounds x="1070" y="631" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1053" y="667" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cezgw4_di" bpmnElement="SequenceFlow_1cezgw4">
+ <di:waypoint xsi:type="dc:Point" x="1106" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="649" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1140" y="624" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0ahp5f8_di" bpmnElement="IntermediateThrowEvent_0x4bho9">
+ <dc:Bounds x="1524" y="417" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1499" y="380.30139720558884" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0yx79m8_di" bpmnElement="IntermediateThrowEvent_0jervei">
+ <dc:Bounds x="1562" y="445" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1565" y="413.30139720558884" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_06h1zmt_di" bpmnElement="IntermediateThrowEvent_1vju4tj">
+ <dc:Bounds x="1601" y="473" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1636" y="455.30139720558884" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0n245lm_di" bpmnElement="IntermediateThrowEvent_1fzppfz">
+ <dc:Bounds x="1636" y="514" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1672" y="494.30139720558884" width="50" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0hnmgom_di" bpmnElement="IntermediateThrowEvent_1e0qowf">
+ <dc:Bounds x="1662" y="562" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1706" y="561.3013972055888" width="61" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0g27srb_di" bpmnElement="IntermediateThrowEvent_1v93roi">
+ <dc:Bounds x="1679" y="614" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1724" y="604.3013972055888" width="90" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_14fm060_di" bpmnElement="IntermediateThrowEvent_04a1dfz">
+ <dc:Bounds x="1679" y="670" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1732" y="660.3013972055888" width="81" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_183osb4_di" bpmnElement="IntermediateThrowEvent_151z73b">
+ <dc:Bounds x="1663" y="717" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1709" y="728" width="61" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0d49blq_di" bpmnElement="IntermediateThrowEvent_10bre7q">
+ <dc:Bounds x="1636" y="756" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1682" y="774.3013972055888" width="54" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_13jsvce_di" bpmnElement="IntermediateThrowEvent_1fl945a">
+ <dc:Bounds x="1601" y="791" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1643" y="818.3013972055888" width="73" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_04zlwpn_di" bpmnElement="IntermediateThrowEvent_1lljtoh">
+ <dc:Bounds x="1562" y="819" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1603" y="851.3013972055888" width="86" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ge1m93_di" bpmnElement="IntermediateThrowEvent_0sub2cf">
+ <dc:Bounds x="1524" y="846" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1505" y="881.3013972055888" width="73" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ei7at5_di" bpmnElement="SequenceFlow_1ei7at5">
+ <di:waypoint xsi:type="dc:Point" x="1498" y="629" />
+ <di:waypoint xsi:type="dc:Point" x="1538" y="452" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1518" y="525.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kg02xg_di" bpmnElement="SequenceFlow_0kg02xg">
+ <di:waypoint xsi:type="dc:Point" x="1501" y="632" />
+ <di:waypoint xsi:type="dc:Point" x="1572" y="479" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1537" y="540.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i6p53b_di" bpmnElement="SequenceFlow_1i6p53b">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="635" />
+ <di:waypoint xsi:type="dc:Point" x="1608" y="504" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1556" y="554.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yy7o24_di" bpmnElement="SequenceFlow_1yy7o24">
+ <di:waypoint xsi:type="dc:Point" x="1508" y="639" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1574" y="575.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sqmtpl_di" bpmnElement="SequenceFlow_0sqmtpl">
+ <di:waypoint xsi:type="dc:Point" x="1511" y="642" />
+ <di:waypoint xsi:type="dc:Point" x="1663" y="586" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1587" y="599" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1shdmrj_di" bpmnElement="SequenceFlow_1shdmrj">
+ <di:waypoint xsi:type="dc:Point" x="1518" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="1679" y="634" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1599" y="626.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1v1i5w4_di" bpmnElement="SequenceFlow_1v1i5w4">
+ <di:waypoint xsi:type="dc:Point" x="1514" y="653" />
+ <di:waypoint xsi:type="dc:Point" x="1680" y="685" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1597" y="654" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h8rscx_di" bpmnElement="SequenceFlow_1h8rscx">
+ <di:waypoint xsi:type="dc:Point" x="1510" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="1665" y="727" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1588" y="677" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xzq6jb_di" bpmnElement="SequenceFlow_1xzq6jb">
+ <di:waypoint xsi:type="dc:Point" x="1507" y="660" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="764" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1574" y="697" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_165q14c_di" bpmnElement="SequenceFlow_165q14c">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="663" />
+ <di:waypoint xsi:type="dc:Point" x="1608" y="795" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1556" y="714" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0wp1a6g_di" bpmnElement="SequenceFlow_0wp1a6g">
+ <di:waypoint xsi:type="dc:Point" x="1501" y="666" />
+ <di:waypoint xsi:type="dc:Point" x="1573" y="821" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1537" y="728.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vymfh9_di" bpmnElement="SequenceFlow_0vymfh9">
+ <di:waypoint xsi:type="dc:Point" x="1497" y="670" />
+ <di:waypoint xsi:type="dc:Point" x="1537" y="847" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1517" y="743.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14yy8v4_di" bpmnElement="SequenceFlow_14yy8v4">
+ <di:waypoint xsi:type="dc:Point" x="963" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o7degu_di" bpmnElement="Task_0iydw5o">
+ <dc:Bounds x="863" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0msgw6c_di" bpmnElement="SequenceFlow_0msgw6c">
+ <di:waypoint xsi:type="dc:Point" x="348" y="1581" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="1581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="385" y="1566" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uhssvq_di" bpmnElement="SequenceFlow_0uhssvq">
+ <di:waypoint xsi:type="dc:Point" x="521" y="1581" />
+ <di:waypoint xsi:type="dc:Point" x="588" y="1581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="555" y="1566" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ph6862_di" bpmnElement="SequenceFlow_0ph6862">
+ <di:waypoint xsi:type="dc:Point" x="688" y="1581" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="718" y="1566" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_10ii2tr_di" bpmnElement="Task_1cl8ayk">
+ <dc:Bounds x="248" y="1541" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qi8yg_di" bpmnElement="Task_0dc1x7g">
+ <dc:Bounds x="588" y="1541" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0bv5v50_di" bpmnElement="Task_1xw8w6a">
+ <dc:Bounds x="421" y="1541" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ScaleCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ScaleCustomE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..5b9cceabff
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ScaleCustomE2EServiceInstance.bpmn
@@ -0,0 +1,379 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="ScaleCustomE2EServiceInstance" name="ScaleCustomE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Scale SI Start Flow">
+ <bpmn:outgoing>SequenceFlow_0c2denm</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_03ivdxi" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0c2denm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ntnafv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new ScaleCustomE2EServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_0oezp57" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_14zd9we</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0er6ddi</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new ScaleCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_13jdprk" name="success ?">
+ <bpmn:incoming>SequenceFlow_1fis1j1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_06f0dx5</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_19b0pmt</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="Task_1ogtanl" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_06f0dx5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1q6spfu</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new ScaleCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_1p5x1em" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ <camunda:in source="CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1q6spfu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0mm4eqd</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:endEvent id="EndEvent_116d9ds" name="End">
+ <bpmn:incoming>SequenceFlow_0mm4eqd</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0mm4eqd" sourceRef="Task_1p5x1em" targetRef="EndEvent_116d9ds" />
+ <bpmn:sequenceFlow id="SequenceFlow_0c2denm" sourceRef="StartEvent_1" targetRef="Task_03ivdxi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ntnafv" sourceRef="Task_03ivdxi" targetRef="Task_1rsd8qa" />
+ <bpmn:sequenceFlow id="SequenceFlow_0er6ddi" sourceRef="Task_0oezp57" targetRef="CallActivity_1vpyqzt" />
+ <bpmn:sequenceFlow id="SequenceFlow_06f0dx5" name="yes" sourceRef="ExclusiveGateway_13jdprk" targetRef="Task_1ogtanl">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) != null && execution.getVariable("jobId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_19b0pmt" name="no" sourceRef="ExclusiveGateway_13jdprk" targetRef="EndEvent_1sz49w7">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) == null || execution.getVariable("jobId" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_1sz49w7">
+ <bpmn:incoming>SequenceFlow_19b0pmt</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_196t4z3" />
+ </bpmn:endEvent>
+ <bpmn:subProcess id="SubProcess_0bwngpt" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0yncnrj">
+ <bpmn:outgoing>SequenceFlow_04f826i</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1lp2j7l">
+ <bpmn:incoming>SequenceFlow_1t2ijcu</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_01p0bqh" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_09z92mf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sooz22</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new ScaleCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1quc7x4" name="Send Error Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_04f826i</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_09z92mf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new ScaleCustomE2EServiceInstance()
+csi.sendSyncError(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_04f826i" sourceRef="StartEvent_0yncnrj" targetRef="ScriptTask_1quc7x4" />
+ <bpmn:sequenceFlow id="SequenceFlow_09z92mf" sourceRef="ScriptTask_1quc7x4" targetRef="ScriptTask_01p0bqh" />
+ <bpmn:sequenceFlow id="SequenceFlow_1t2ijcu" sourceRef="CallActivity_0miglgb" targetRef="EndEvent_1lp2j7l" />
+ <bpmn:sequenceFlow id="SequenceFlow_1sooz22" sourceRef="ScriptTask_01p0bqh" targetRef="CallActivity_0miglgb" />
+ <bpmn:callActivity id="CallActivity_0miglgb" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1sooz22</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1t2ijcu</bpmn:outgoing>
+ </bpmn:callActivity>
+ </bpmn:subProcess>
+ <bpmn:subProcess id="SubProcess_10vzjzh" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_1jgr212" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0gna7ys</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0re5dm7</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1awfo4s">
+ <bpmn:outgoing>SequenceFlow_0gna7ys</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_04azej9">
+ <bpmn:incoming>SequenceFlow_0re5dm7</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0gna7ys" name="" sourceRef="StartEvent_1awfo4s" targetRef="ScriptTask_1jgr212" />
+ <bpmn:sequenceFlow id="SequenceFlow_0re5dm7" name="" sourceRef="ScriptTask_1jgr212" targetRef="EndEvent_04azej9" />
+ </bpmn:subProcess>
+ <bpmn:callActivity id="CallActivity_1vpyqzt" name="Call DoScaleE2EServiceInstance&#10;" calledElement="DoScaleE2EServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:out source="jobId" target="jobId" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:out source="operationId" target="operationId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="nodeTemplateUUID" target="nodeTemplateUUID" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="requestDescription" target="requestDescription" />
+ <camunda:in source="operationId" target="operationId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0er6ddi</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1fis1j1</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1fis1j1" sourceRef="CallActivity_1vpyqzt" targetRef="ExclusiveGateway_13jdprk" />
+ <bpmn:sequenceFlow id="SequenceFlow_1q6spfu" sourceRef="Task_1ogtanl" targetRef="Task_1p5x1em" />
+ <bpmn:sequenceFlow id="SequenceFlow_030pfun" sourceRef="Task_1rsd8qa" targetRef="Task_01n9mqa" />
+ <bpmn:scriptTask id="Task_1rsd8qa" name="Init Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ntnafv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_030pfun</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new ScaleCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_14zd9we" sourceRef="Task_01n9mqa" targetRef="Task_0oezp57" />
+ <bpmn:serviceTask id="Task_01n9mqa" name="Update Service Operation Status">
+ <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_updateServiceOperStatusRequest}</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_030pfun</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14zd9we</bpmn:outgoing>
+ </bpmn:serviceTask>
+ </bpmn:process>
+ <bpmn:error id="Error_196t4z3" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ScaleCustomE2EServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-13" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-28" y="138" width="67" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nye5g4_di" bpmnElement="Task_03ivdxi">
+ <dc:Bounds x="87" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_08uouf4_di" bpmnElement="Task_0oezp57">
+ <dc:Bounds x="560" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_13jdprk_di" bpmnElement="ExclusiveGateway_13jdprk" isMarkerVisible="true">
+ <dc:Bounds x="928" y="95" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="73" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_11xceoj_di" bpmnElement="Task_1ogtanl">
+ <dc:Bounds x="1068" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1qhplvz_di" bpmnElement="Task_1p5x1em">
+ <dc:Bounds x="1068" y="281" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_116d9ds_di" bpmnElement="EndEvent_116d9ds">
+ <dc:Bounds x="1100" y="554" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1109" y="594" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mm4eqd_di" bpmnElement="SequenceFlow_0mm4eqd">
+ <di:waypoint xsi:type="dc:Point" x="1118" y="361" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="554" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1088" y="451.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c2denm_di" bpmnElement="SequenceFlow_0c2denm">
+ <di:waypoint xsi:type="dc:Point" x="23" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="87" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="10" y="99" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ntnafv_di" bpmnElement="SequenceFlow_1ntnafv">
+ <di:waypoint xsi:type="dc:Point" x="187" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="249" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="173" y="99" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0er6ddi_di" bpmnElement="SequenceFlow_0er6ddi">
+ <di:waypoint xsi:type="dc:Point" x="660" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="729" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649.5" y="99" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06f0dx5_di" bpmnElement="SequenceFlow_06f0dx5">
+ <di:waypoint xsi:type="dc:Point" x="978" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1014" y="99" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19b0pmt_di" bpmnElement="SequenceFlow_19b0pmt">
+ <di:waypoint xsi:type="dc:Point" x="953" y="145" />
+ <di:waypoint xsi:type="dc:Point" x="953" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="962" y="183" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_00ekif2_di" bpmnElement="EndEvent_1sz49w7">
+ <dc:Bounds x="935" y="232" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="953" y="272" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0bwngpt_di" bpmnElement="SubProcess_0bwngpt" isExpanded="true">
+ <dc:Bounds x="168" y="326" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0yncnrj_di" bpmnElement="StartEvent_0yncnrj">
+ <dc:Bounds x="183" y="412" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="453" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1lp2j7l_di" bpmnElement="EndEvent_1lp2j7l">
+ <dc:Bounds x="762" y="412" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645" y="453" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01p0bqh_di" bpmnElement="ScriptTask_01p0bqh">
+ <dc:Bounds x="441" y="390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0miglgb_di" bpmnElement="CallActivity_0miglgb">
+ <dc:Bounds x="618" y="390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1quc7x4_di" bpmnElement="ScriptTask_1quc7x4">
+ <dc:Bounds x="263" y="390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04f826i_di" bpmnElement="SequenceFlow_04f826i">
+ <di:waypoint xsi:type="dc:Point" x="219" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="241" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="241" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="262" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="121" y="430" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09z92mf_di" bpmnElement="SequenceFlow_09z92mf">
+ <di:waypoint xsi:type="dc:Point" x="363" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="441" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="270" y="430" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t2ijcu_di" bpmnElement="SequenceFlow_1t2ijcu">
+ <di:waypoint xsi:type="dc:Point" x="718" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="605" y="415" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sooz22_di" bpmnElement="SequenceFlow_1sooz22">
+ <di:waypoint xsi:type="dc:Point" x="541" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="447" y="415" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_10vzjzh_di" bpmnElement="SubProcess_10vzjzh" isExpanded="true">
+ <dc:Bounds x="294" y="593" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1jgr212_di" bpmnElement="ScriptTask_1jgr212">
+ <dc:Bounds x="442" y="648" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1awfo4s_di" bpmnElement="StartEvent_1awfo4s">
+ <dc:Bounds x="327" y="670" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="210" y="711" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04azej9_di" bpmnElement="EndEvent_04azej9">
+ <dc:Bounds x="603" y="670" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="711" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gna7ys_di" bpmnElement="SequenceFlow_0gna7ys">
+ <di:waypoint xsi:type="dc:Point" x="363" y="688" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="688" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="272" y="688" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0re5dm7_di" bpmnElement="SequenceFlow_0re5dm7">
+ <di:waypoint xsi:type="dc:Point" x="542" y="688" />
+ <di:waypoint xsi:type="dc:Point" x="603" y="688" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="444" y="688" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1vpyqzt_di" bpmnElement="CallActivity_1vpyqzt">
+ <dc:Bounds x="729" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fis1j1_di" bpmnElement="SequenceFlow_1fis1j1">
+ <di:waypoint xsi:type="dc:Point" x="829" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="878.5" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6spfu_di" bpmnElement="SequenceFlow_1q6spfu">
+ <di:waypoint xsi:type="dc:Point" x="1118" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="281" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1088" y="214.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_030pfun_di" bpmnElement="SequenceFlow_030pfun">
+ <di:waypoint xsi:type="dc:Point" x="349" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="371" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16ll9yo_di" bpmnElement="Task_1rsd8qa">
+ <dc:Bounds x="249" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14zd9we_di" bpmnElement="SequenceFlow_14zd9we">
+ <di:waypoint xsi:type="dc:Point" x="493" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526.5" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1kpeoxt_di" bpmnElement="Task_01n9mqa">
+ <dc:Bounds x="393" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
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
new file mode 100644
index 0000000000..28bd3f76ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
@@ -0,0 +1,693 @@
+<?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="UpdateCustomE2EServiceInstance" name="UpdateCustomE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_00qj6ro" name="Update SI Start Flow">
+ <bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:subProcess id="SubProcess_0ka59nc" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0u3lw39" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1dsbjjb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yay321</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_0v1ffn4">
+ <bpmn:outgoing>SequenceFlow_1dsbjjb</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0eznq6x">
+ <bpmn:incoming>SequenceFlow_1yay321</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
+ </bpmn:subProcess>
+ <bpmn:callActivity id="DoUpdateE2EServiceInstance" name="Call DoUpdateE2EServiceInstance&#10;" calledElement="DoUpdateE2EServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="initialStatus" target="initialStatus" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="URN_mso_adapters_openecomp_db_endpoint" target="URN_mso_adapters_openecomp_db_endpoint" />
+ <camunda:in source="serviceDecomposition_Target" target="serviceDecomposition_Target" />
+ <camunda:in source="serviceDecomposition_Original" target="serviceDecomposition_Original" />
+ <camunda:in source="addResourceList" target="addResourceList" />
+ <camunda:in source="delResourceList" target="delResourceList" />
+ <camunda:in source="serviceRelationShip" target="serviceRelationShip" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_04qwbbf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:endEvent id="EndEvent_0bpd6c0" name="End">
+ <bpmn:incoming>SequenceFlow_0yayvrf</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_1s09c7d" name="Pre Process Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0s2spoq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0az1n4y</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new UpdateCustomE2EServiceInstance()
+csi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_0ttvn8r" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_14zu6wr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0je30si</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new UpdateCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_02fyxz0" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn:extensionElements>
+ <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0je30si</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yayvrf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_0vaws86" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0dug28e">
+ <bpmn:outgoing>SequenceFlow_0e1r62n</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_03wysuk">
+ <bpmn:incoming>SequenceFlow_1ysapam</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0u8o9p2" name="Prepare Fallout Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0n9pexp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01umodj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new UpdateCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1ang7q8" name="Call FalloutHandler" calledElement="FalloutHandler">
+ <bpmn:extensionElements>
+ <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_01umodj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ysapam</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="ScriptTask_1rn6nqi" name="Send Error Response">
+ <bpmn:incoming>SequenceFlow_06o383f</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0n9pexp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new UpdateCustomE2EServiceInstance()
+csi.sendSyncError(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1r62n" sourceRef="StartEvent_0dug28e" targetRef="ScriptTask_14kqo0r" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ysapam" sourceRef="CallActivity_1ang7q8" targetRef="EndEvent_03wysuk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0n9pexp" sourceRef="ScriptTask_1rn6nqi" targetRef="ScriptTask_0u8o9p2" />
+ <bpmn:sequenceFlow id="SequenceFlow_01umodj" sourceRef="ScriptTask_0u8o9p2" targetRef="CallActivity_1ang7q8" />
+ <bpmn:scriptTask id="ScriptTask_14kqo0r" name="Prepare Update Service Oper Status(error)" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0e1r62n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0t4nds2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ execution.setVariable("progress", "100")
+ execution.setVariable("operationStatus", "Finished")
+ execution.setVariable("operationResult", "Error")
+ execution.setVariable("operationReason", "Exception happened")
+ def ddsi = new UpdateCustomE2EServiceInstance()
+ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0t4nds2" sourceRef="ScriptTask_14kqo0r" targetRef="ServiceTask_1af6rwh" />
+ <bpmn:serviceTask id="ServiceTask_1af6rwh" name="Update Service Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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_0t4nds2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_06o383f</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_06o383f" sourceRef="ServiceTask_1af6rwh" targetRef="ScriptTask_1rn6nqi" />
+ </bpmn:subProcess>
+ <bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_12dou7o</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0secadm</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new UpdateCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0aqn64l" name="Success?" default="SequenceFlow_1fueo69">
+ <bpmn:incoming>SequenceFlow_0klbpxx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14zu6wr</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1fueo69</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_07uk5iy">
+ <bpmn:incoming>SequenceFlow_1fueo69</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_0nbdy47" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0s2spoq" sourceRef="StartEvent_00qj6ro" targetRef="ScriptTask_1s09c7d" />
+ <bpmn:sequenceFlow id="SequenceFlow_0klbpxx" sourceRef="DoUpdateE2EServiceInstance" targetRef="ExclusiveGateway_0aqn64l" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yayvrf" sourceRef="CallActivity_02fyxz0" targetRef="EndEvent_0bpd6c0" />
+ <bpmn:sequenceFlow id="SequenceFlow_14zu6wr" name="yes" sourceRef="ExclusiveGateway_0aqn64l" targetRef="ScriptTask_0ttvn8r">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression>
+ </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: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>
+ </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>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new UpdateCustomE2EServiceInstance()
+csi.postCompareModelVersions(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_0hixtxc" name="Prepare for Compare Model Versions" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_03i6zhx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1pdv4qj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new UpdateCustomE2EServiceInstance()
+ddsi.preCompareModelVersions(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1rkoyc5" name="Call DoCompareModelVersions" calledElement="DoCompareModelVersions">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="model-invariant-id-target" target="model-invariant-id-target" />
+ <camunda:in source="model-version-id-target" target="model-version-id-target" />
+ <camunda:in source="model-invariant-id-original" target="model-invariant-id-original" />
+ <camunda:in source="model-version-id-original" target="model-version-id-original" />
+ <camunda:out source="serviceDecomposition_Target" target="serviceDecomposition_Target" />
+ <camunda:out source="serviceDecomposition_Original" target="serviceDecomposition_Original" />
+ <camunda:out source="addResourceList" target="addResourceList" />
+ <camunda:out source="delResourceList" target="delResourceList" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1pdv4qj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xhbobd</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_03i6zhx" sourceRef="ScriptTask_0cx1y0g" targetRef="ScriptTask_0hixtxc" />
+ <bpmn:sequenceFlow id="SequenceFlow_1pdv4qj" sourceRef="ScriptTask_0hixtxc" targetRef="CallActivity_1rkoyc5" />
+ <bpmn:sequenceFlow id="SequenceFlow_0xhbobd" sourceRef="CallActivity_1rkoyc5" targetRef="ScriptTask_11y3uq6" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0mc34qe" name="HasResourcetoUpdate?" default="SequenceFlow_1n8h3zt">
+ <bpmn:incoming>SequenceFlow_0secadm</bpmn:incoming>
+ <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:intermediateCatchEvent id="IntermediateCatchEvent_0m01dm3" name="StartDoUpdate">
+ <bpmn:outgoing>SequenceFlow_04qwbbf</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="StartDoUpdate" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0secadm" sourceRef="ScriptTask_0xupxj9" targetRef="ExclusiveGateway_0mc34qe" />
+ <bpmn:sequenceFlow id="SequenceFlow_04qwbbf" sourceRef="IntermediateCatchEvent_0m01dm3" targetRef="DoUpdateE2EServiceInstance" />
+ <bpmn:endEvent id="EndEvent_1jvqhkf" name="End">
+ <bpmn:incoming>SequenceFlow_0kvl23y</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_16sgdqw" name="Init Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1bddzne</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1e3vtyq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new UpdateCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_0qjpd5v" name="Update Service Operation Status">
+ <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_updateServiceOperStatusRequest}</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_1e3vtyq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12dou7o</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1e3vtyq" sourceRef="ScriptTask_16sgdqw" targetRef="ServiceTask_0qjpd5v" />
+ <bpmn:sequenceFlow id="SequenceFlow_12dou7o" sourceRef="ServiceTask_0qjpd5v" targetRef="ScriptTask_0xupxj9" />
+ <bpmn:serviceTask id="ServiceTask_0mj3kf2" name="Update Service Operation Status">
+ <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_updateServiceOperStatusRequest}</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_1wzk6tu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0kvl23y</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_08mk8h9" name="GoToOperStatusInit">
+ <bpmn:incoming>SequenceFlow_0t7zinj</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartOperStatusInit" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0t7zinj" sourceRef="ScriptTask_11y3uq6" targetRef="IntermediateThrowEvent_08mk8h9" />
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_14w7v9s" name="StartOperStatusInit">
+ <bpmn:outgoing>SequenceFlow_1bddzne</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="StartOperStatusInit" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1bddzne" sourceRef="IntermediateCatchEvent_14w7v9s" targetRef="ScriptTask_16sgdqw" />
+ <bpmn:scriptTask id="ScriptTask_04a0t3p" name="Prepare Update Service Oper Status(100%)" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1n8h3zt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wzk6tu</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "100")
+execution.setVariable("operationStatus", "Finished")
+execution.setVariable("operationResult", "End")
+execution.setVariable("operationReason", "No resource to add or delete")
+def ddsi = new UpdateCustomE2EServiceInstance()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1wzk6tu" sourceRef="ScriptTask_04a0t3p" targetRef="ServiceTask_0mj3kf2" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1k72hze" name="GoToDoUpdate">
+ <bpmn:incoming>SequenceFlow_0zmd4rt</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartDoUpdate" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0kvl23y" sourceRef="ServiceTask_0mj3kf2" targetRef="EndEvent_1jvqhkf" />
+ <bpmn:sequenceFlow id="SequenceFlow_0zmd4rt" name="Yes" sourceRef="ExclusiveGateway_0mc34qe" targetRef="IntermediateThrowEvent_1k72hze">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("hasResourcetoUpdate") == true}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1n8h3zt" name="No" sourceRef="ExclusiveGateway_0mc34qe" targetRef="ScriptTask_04a0t3p" />
+ </bpmn:process>
+ <bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateCustomE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
+ <dc:Bounds x="-6" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-24" y="221" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0ka59nc_di" bpmnElement="SubProcess_0ka59nc" isExpanded="true">
+ <dc:Bounds x="439" y="1170" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0rhljy8_di" bpmnElement="DoUpdateE2EServiceInstance">
+ <dc:Bounds x="284" y="585" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0bpd6c0_di" bpmnElement="EndEvent_0bpd6c0">
+ <dc:Bounds x="1192" y="607" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1204" y="643" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
+ <dc:Bounds x="105" 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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_02fyxz0_di" bpmnElement="CallActivity_02fyxz0">
+ <dc:Bounds x="959" y="585" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0vaws86_di" bpmnElement="SubProcess_0vaws86" isExpanded="true">
+ <dc:Bounds x="-61" y="908" width="1322" height="164" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xupxj9_di" bpmnElement="ScriptTask_0xupxj9">
+ <dc:Bounds x="451" y="337" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0aqn64l_di" bpmnElement="ExclusiveGateway_0aqn64l" isMarkerVisible="true">
+ <dc:Bounds x="639" y="600" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="640" y="572" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_07uk5iy_di" bpmnElement="EndEvent_07uk5iy">
+ <dc:Bounds x="646" y="713" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="527" y="1016" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="22.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
+ <di:waypoint xsi:type="dc:Point" x="384" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="466.5" y="604" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="1192" y="625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1080.5" y="604" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14zu6wr_di" bpmnElement="SequenceFlow_14zu6wr">
+ <di:waypoint xsi:type="dc:Point" x="689" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="727.1481481481482" y="622" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0je30si_di" bpmnElement="SequenceFlow_0je30si">
+ <di:waypoint xsi:type="dc:Point" x="882" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="875.5" y="604" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fueo69_di" bpmnElement="SequenceFlow_1fueo69">
+ <di:waypoint xsi:type="dc:Point" x="664" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="713" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="677" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u3lw39_di" bpmnElement="ScriptTask_0u3lw39">
+ <dc:Bounds x="587" y="1225" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0v1ffn4_di" bpmnElement="StartEvent_0v1ffn4">
+ <dc:Bounds x="472" y="1247" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="1288" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0eznq6x_di" bpmnElement="EndEvent_0eznq6x">
+ <dc:Bounds x="748" y="1247" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="676" y="1288" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0dug28e_di" bpmnElement="StartEvent_0dug28e">
+ <dc:Bounds x="-20" y="994" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-92" y="1035" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_03wysuk_di" bpmnElement="EndEvent_03wysuk">
+ <dc:Bounds x="1194" y="994" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="1035" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0u8o9p2_di" bpmnElement="ScriptTask_0u8o9p2">
+ <dc:Bounds x="777" y="972" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ang7q8_di" bpmnElement="CallActivity_1ang7q8">
+ <dc:Bounds x="963" y="972" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rn6nqi_di" bpmnElement="ScriptTask_1rn6nqi">
+ <dc:Bounds x="577" y="972" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dsbjjb_di" bpmnElement="SequenceFlow_1dsbjjb">
+ <di:waypoint xsi:type="dc:Point" x="508" y="1265" />
+ <di:waypoint xsi:type="dc:Point" x="587" y="1265" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461" y="1265" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yay321_di" bpmnElement="SequenceFlow_1yay321">
+ <di:waypoint xsi:type="dc:Point" x="687" y="1265" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1265" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="1265" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1r62n_di" bpmnElement="SequenceFlow_0e1r62n">
+ <di:waypoint xsi:type="dc:Point" x="16" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="122" y="1012" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="24" y="991" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ysapam_di" bpmnElement="SequenceFlow_1ysapam">
+ <di:waypoint xsi:type="dc:Point" x="1063" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="1194" y="1012" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1083.5" y="991" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n9pexp_di" bpmnElement="SequenceFlow_0n9pexp">
+ <di:waypoint xsi:type="dc:Point" x="677" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="777" y="1012" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="682" y="991" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01umodj_di" bpmnElement="SequenceFlow_01umodj">
+ <di:waypoint xsi:type="dc:Point" x="877" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="1012" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ </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" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="537.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="782" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="703" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xhbobd_di" bpmnElement="SequenceFlow_0xhbobd">
+ <di:waypoint xsi:type="dc:Point" x="882" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="875.5" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0mc34qe_di" bpmnElement="ExclusiveGateway_0mc34qe" isMarkerVisible="true">
+ <dc:Bounds x="639" y="352" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="622" y="324" width="85" height="24" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="239.5" y="177" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0m01dm3_di" bpmnElement="IntermediateCatchEvent_0m01dm3">
+ <dc:Bounds x="-6" y="607" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-21" y="669" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0secadm_di" bpmnElement="SequenceFlow_0secadm">
+ <di:waypoint xsi:type="dc:Point" x="551" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="356" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04qwbbf_di" bpmnElement="SequenceFlow_04qwbbf">
+ <di:waypoint xsi:type="dc:Point" x="30" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="284" y="625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="112" y="604" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1jvqhkf_di" bpmnElement="EndEvent_1jvqhkf">
+ <dc:Bounds x="1192" y="359" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1200" y="404" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16sgdqw_di" bpmnElement="ScriptTask_16sgdqw">
+ <dc:Bounds x="97" y="337" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0qjpd5v_di" bpmnElement="ServiceTask_0qjpd5v">
+ <dc:Bounds x="274" y="337" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1e3vtyq_di" bpmnElement="SequenceFlow_1e3vtyq">
+ <di:waypoint xsi:type="dc:Point" x="197" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="274" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235.5" y="356" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12dou7o_di" bpmnElement="SequenceFlow_12dou7o">
+ <di:waypoint xsi:type="dc:Point" x="374" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412.5" y="356" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0mj3kf2_di" bpmnElement="ServiceTask_0mj3kf2">
+ <dc:Bounds x="959" y="337" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_08mk8h9_di" bpmnElement="IntermediateThrowEvent_08mk8h9">
+ <dc:Bounds x="1192" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1175" y="220" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t7zinj_di" bpmnElement="SequenceFlow_0t7zinj">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="1192" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1125.5" y="177" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_14w7v9s_di" bpmnElement="IntermediateCatchEvent_14w7v9s">
+ <dc:Bounds x="-6" y="359" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-29" y="421" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bddzne_di" bpmnElement="SequenceFlow_1bddzne">
+ <di:waypoint xsi:type="dc:Point" x="30" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="97" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="63.5" y="356" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14kqo0r_di" bpmnElement="ScriptTask_14kqo0r">
+ <dc:Bounds x="122" y="972" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1af6rwh_di" bpmnElement="ServiceTask_1af6rwh">
+ <dc:Bounds x="350" y="972" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4nds2_di" bpmnElement="SequenceFlow_0t4nds2">
+ <di:waypoint xsi:type="dc:Point" x="222" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="1012" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="286" y="991" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06o383f_di" bpmnElement="SequenceFlow_06o383f">
+ <di:waypoint xsi:type="dc:Point" x="450" y="1012" />
+ <di:waypoint xsi:type="dc:Point" x="577" y="1012" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="513.5" y="991" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_04a0t3p_di" bpmnElement="ScriptTask_04a0t3p">
+ <dc:Bounds x="782" y="337" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wzk6tu_di" bpmnElement="SequenceFlow_1wzk6tu">
+ <di:waypoint xsi:type="dc:Point" x="882" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="920.5" y="356" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1k72hze_di" bpmnElement="IntermediateThrowEvent_1k72hze">
+ <dc:Bounds x="646" y="447" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="631" y="487" width="76" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kvl23y_di" bpmnElement="SequenceFlow_0kvl23y">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="1192" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1125.5" y="356" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zmd4rt_di" bpmnElement="SequenceFlow_0zmd4rt">
+ <di:waypoint xsi:type="dc:Point" x="664" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="447" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="670" y="419" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n8h3zt_di" bpmnElement="SequenceFlow_1n8h3zt">
+ <di:waypoint xsi:type="dc:Point" x="689" y="377" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="377" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="729" y="356" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateNetworkInstance.bpmn
new file mode 100644
index 0000000000..e5236f92bf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateNetworkInstance.bpmn
@@ -0,0 +1,322 @@
+<?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.14.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="UpdateNetworkInstance" name="UpdateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def networkMod = new UpdateNetworkInstance()
+networkMod.processJavaException(execution)</bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="doUpdateNetworkInstance_CallActivity" name="DoUpdate Network Instance&#10;" calledElement="DoUpdateNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="networkName" target="networkName" />
+ <camunda:in source="networkModelInfo" target="networkModelInfo" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="networkInputParams" target="networkInputParams" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_0o440av" name="End">
+ <bpmn2:incoming>SequenceFlow_0x3znm5</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_09qt0pi" name="CreateNetwork&#10;PostProcess Success&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095crcd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x3znm5</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.postProcessResponse(execution)
+</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lj31zp" sourceRef="doUpdateNetworkInstance_CallActivity" targetRef="ScriptTask_0cihgpv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x3znm5" sourceRef="ScriptTask_09qt0pi" targetRef="EndEvent_0o440av" />
+ <bpmn2:scriptTask id="ScriptTask_0pvcr6j" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0lp2z7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ablr60</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def preProcess = new UpdateNetworkInstance()
+preProcess.preProcessRequest(execution)</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lp2z7l" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_0pvcr6j" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ablr60" sourceRef="ScriptTask_0pvcr6j" targetRef="Task_19xbdbu" />
+ <bpmn2:scriptTask id="ScriptTask_0cihgpv" name="Prepare Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1lj31zp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xxvjxq</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.prepareCompletion(execution)</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0sevgre" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+ <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+ <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xxvjxq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_095crcd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xxvjxq" sourceRef="ScriptTask_0cihgpv" targetRef="CallActivity_0sevgre" />
+ <bpmn2:subProcess id="SubProcess_1k2112i" name="Sub-process for FalloutHandler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_110xxgx">
+ <bpmn2:outgoing>SequenceFlow_0n4umjf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1rqikib">
+ <bpmn2:incoming>SequenceFlow_1ghqolv</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1hql91g" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n4umjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1reso2f</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.buildErrorResponse(execution)</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ksm1dz" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+ <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+ <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1reso2f</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ghqolv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1reso2f" sourceRef="ScriptTask_1hql91g" targetRef="CallActivity_1ksm1dz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ghqolv" sourceRef="CallActivity_1ksm1dz" targetRef="EndEvent_1rqikib" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n4umjf" sourceRef="StartEvent_110xxgx" targetRef="ScriptTask_1hql91g" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_095crcd" sourceRef="CallActivity_0sevgre" targetRef="ScriptTask_09qt0pi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0rt8wax" sourceRef="Task_19xbdbu" targetRef="Task_1nko5zz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eto8sn" sourceRef="Task_1nko5zz" targetRef="doUpdateNetworkInstance_CallActivity" />
+ <bpmn2:scriptTask id="Task_19xbdbu" name="Get Network Model Info&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ablr60</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0rt8wax</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.getNetworkModelInfo(execution)</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1nko5zz" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rt8wax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eto8sn</bpmn2:outgoing>
+ <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.sendSyncResponse(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="3" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="370" y="734" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="403" y="811" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="376" y="852" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="518" y="789" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="679" y="811" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="852" 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 x="439" y="829" />
+ <di:waypoint x="518" y="829" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="436" y="829" 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 x="618" y="829" />
+ <di:waypoint x="679" y="829" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="829" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doUpdateNetworkInstance_CallActivity">
+ <dc:Bounds x="692" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1408" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="115" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09qt0pi_di" bpmnElement="ScriptTask_09qt0pi">
+ <dc:Bounds x="1253" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint x="792" y="97" />
+ <di:waypoint x="907" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x3znm5_di" bpmnElement="SequenceFlow_0x3znm5">
+ <di:waypoint x="1353" y="97" />
+ <di:waypoint x="1408" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pvcr6j_di" bpmnElement="ScriptTask_0pvcr6j">
+ <dc:Bounds x="139" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lp2z7l_di" bpmnElement="SequenceFlow_0lp2z7l">
+ <di:waypoint x="39" y="97" />
+ <di:waypoint x="89" y="97" />
+ <di:waypoint x="89" y="97" />
+ <di:waypoint x="139" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ablr60_di" bpmnElement="SequenceFlow_1ablr60">
+ <di:waypoint x="239" y="97" />
+ <di:waypoint x="306" y="97" />
+ <di:waypoint x="306" y="97" />
+ <di:waypoint x="372" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cihgpv_di" bpmnElement="ScriptTask_0cihgpv">
+ <dc:Bounds x="907" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="1071" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint x="1007" y="97" />
+ <di:waypoint x="1071" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="436" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="611" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="200" y="354" width="681" height="293" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="283" y="483" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="524" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="786" y="483" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="759" y="524" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint x="536" y="501" />
+ <di:waypoint x="611" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="529" y="486" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint x="711" y="501" />
+ <di:waypoint x="786" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="704" y="486" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint x="1171" y="97" />
+ <di:waypoint x="1253" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1212" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint x="319" y="501" />
+ <di:waypoint x="436" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="332.5" y="486" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rt8wax_di" bpmnElement="SequenceFlow_0rt8wax">
+ <di:waypoint x="472" y="97" />
+ <di:waypoint x="558" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint x="658" y="97" />
+ <di:waypoint x="692" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="675" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gpvlh8_di" bpmnElement="Task_19xbdbu">
+ <dc:Bounds x="372" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="558" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfra.bpmn
new file mode 100644
index 0000000000..c35e7ece96
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfra.bpmn
@@ -0,0 +1,297 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="UpdateVfModuleInfra" name="UpdateVfModuleInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_7" name="DoUpdateVfModule (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.prepDoUpdateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.completionHandlerPrep(execution, 'UPDVfModI_CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.falloutHandlerPrep(execution, 'UPDVfModI_FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2" />
+ <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_requestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="UPDVfModI_vnfType" target="vnfType" />
+ <camunda:in source="UPDVfModI_vnfName" target="vnfName" />
+ <camunda:in source="UPDVfModI_vnfId" target="vnfId" />
+ <camunda:in source="UPDVfModI_vfModuleName" target="vfModuleName" />
+ <camunda:in source="UPDVfModI_vfModuleType" target="vfModuleType" />
+ <camunda:in source="UPDVfModI_vfModuleId" target="vfModuleId" />
+ <camunda:in source="UPDVfModI_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="UPDVfModI_volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="UPDVfModI_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="UPDVfModI_asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="UPDVfModI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="UPDVfModI_serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="UPDVfModI_vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="UPDVfModI_globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="UPDVfModI_lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="UPDVfModI_tenantId" target="tenantId" />
+ <camunda:in source="UPDVfModI_sdncVersion" target="sdncVersion" />
+ <camunda:in source="UPDVfModI_vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="UPDVfModI_usePreload" target="usePreload" />
+ <camunda:in source="UPDVfModI_vfModuleInputParams" target="vfModuleInputParams" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_10" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="149" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="150" y="113" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="605" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="598" y="411" width="50" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="185" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="299" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="399" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="90" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="449" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">
+ <di:waypoint xsi:type="dc:Point" x="498" y="130" />
+ <di:waypoint xsi:type="dc:Point" x="498" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="199" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="169" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="449" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="549" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="605" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="723" y="186" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="149" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="149" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="299" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="249" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="65" y="536" width="565" height="241" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="129" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="98" y="671" width="98" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="209" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="165" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="309" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="325" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="533" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="612" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="671" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="704" y="630" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="671" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="648" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="948" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="377" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="399" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="449" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="356" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="477" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="533" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="373" y="456" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">
+ <di:waypoint xsi:type="dc:Point" x="249" y="230" />
+ <di:waypoint xsi:type="dc:Point" x="299" y="230" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="274" y="205" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="299" y="190" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="399" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="99" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="99" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="149" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="232" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfraV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfraV2.bpmn
new file mode 100644
index 0000000000..1efb127e33
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleInfraV2.bpmn
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_F0omAMXGEeW834CKd-K10Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="UpdateVfModuleInfraV2" name="UpdateVfModuleInfraV2" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="start">
+ <bpmn2:outgoing>SequenceFlow_07r1tup</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_07r1tup" sourceRef="StartEvent_1" targetRef="preProcessRequest" />
+ <bpmn2:scriptTask id="checkPserverFlag" name="Pserver Flag Check (A&#38;AI)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_09izs9b</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gyzpu9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.checkPserverFlag(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_07r1tup</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04cyigk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="sendSynchResponse" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04cyigk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_09izs9b</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="vfFlagCheck" name="VF+ Flag Check (A&#38;AI)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gyzpu9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16xzdgi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.vfFlagCheck(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="lockAppC" name="Lock (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1oa0jsk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ozbxok</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.lockAppC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="healthCheckAppC" name="Health Check (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ozbxok</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17c5hhe</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.healthCheckAppC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="healthDiagnosticSDNO" name="Health Diagnostic (SDN-O)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17c5hhe</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pqikpt</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.healthDiagnosticSDNO(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="stopVfModuleController" name="Stop VF Module (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1pqikpt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0m6q3pf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.stopVfModuleController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="healthCheckController" name="Health Check (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vj0wfl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cskhwy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.healthCheckController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="startVfModuleController" name="Start VF Module (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cskhwy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_067f4jv</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.startVfModuleController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="vFFlagUnset" name="VF+ Flag Unset (A&#38;AI)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_067f4jv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1trqy93</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.vFFlagUnset(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="unlockAppC" name="Unlock (App-C)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1trqy93</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0fc550l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.unlockAppC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="postUpgradeHealthCheckController" name="Post-Upgrade Health Check (App-c)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0fc550l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uquo5r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.postUpgradeHealthCheckController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_04cyigk" sourceRef="preProcessRequest" targetRef="sendSynchResponse" />
+ <bpmn2:sequenceFlow id="SequenceFlow_09izs9b" sourceRef="sendSynchResponse" targetRef="checkPserverFlag" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0gyzpu9" sourceRef="checkPserverFlag" targetRef="vfFlagCheck" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pqikpt" sourceRef="healthDiagnosticSDNO" targetRef="stopVfModuleController" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0cskhwy" sourceRef="healthCheckController" targetRef="startVfModuleController" />
+ <bpmn2:sequenceFlow id="SequenceFlow_067f4jv" sourceRef="startVfModuleController" targetRef="vFFlagUnset" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1trqy93" sourceRef="vFFlagUnset" targetRef="unlockAppC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0fc550l" sourceRef="unlockAppC" targetRef="postUpgradeHealthCheckController" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1uquo5r" sourceRef="postUpgradeHealthCheckController" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="doUpdateVfModulePrep" name="DoUpdateVfModule (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0m6q3pf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ykv4yr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.doUpdateVfModulePrep(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="completionHandlerPrep" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1x3xeba</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01yr04k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.completionHandlerPrep(execution,"UPDVfModI_CompletionHandlerRequest")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="setSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1rfmnuo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vj0wfl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ozbxok" sourceRef="lockAppC" targetRef="healthCheckAppC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17c5hhe" sourceRef="healthCheckAppC" targetRef="healthDiagnosticSDNO" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0m6q3pf" sourceRef="stopVfModuleController" targetRef="doUpdateVfModulePrep" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vj0wfl" sourceRef="setSuccessIndicator" targetRef="healthCheckController" />
+ <bpmn2:endEvent id="EndEvent_1" name="end">
+ <bpmn2:incoming>SequenceFlow_1uquo5r</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16xzdgi" sourceRef="vfFlagCheck" targetRef="vfFlagSet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1oa0jsk" sourceRef="vfFlagSet" targetRef="lockAppC" />
+ <bpmn2:scriptTask id="vfFlagSet" name="VF+ Flag Set(A&#38;AI)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16xzdgi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1oa0jsk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVfModuleInfraV2()
+uvfm.vfFlagSet(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rfmnuo" sourceRef="CallActivity_1mn9pxh" targetRef="setSuccessIndicator" />
+ <bpmn2:callActivity id="CallActivity_12if1z7" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_requestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="UPDVfModI_vnfType" target="vnfType" />
+ <camunda:in source="UPDVfModI_vnfName" target="vnfName" />
+ <camunda:in source="UPDVfModI_vnfId" target="vnfId" />
+ <camunda:in source="UPDVfModI_vfModuleName" target="vfModuleName" />
+ <camunda:in source="UPDVfModI_vfModuleType" target="vfModuleType" />
+ <camunda:in source="UPDVfModI_vfModuleId" target="vfModuleId" />
+ <camunda:in source="UPDVfModI_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="UPDVfModI_volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="UPDVfModI_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="UPDVfModI_asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="UPDVfModI_serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="UPDVfModI_serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="UPDVfModI_vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="UPDVfModI_globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="UPDVfModI_lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="UPDVfModI_tenantId" target="tenantId" />
+ <camunda:in source="UPDVfModI_sdncVersion" target="sdncVersion" />
+ <camunda:in source="UPDVfModI_vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="UPDVfModI_usePreload" target="usePreload" />
+ <camunda:in source="UPDVfModI_vfModuleInputParams" target="vfModuleInputParams" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1ykv4yr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1x3xeba</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ykv4yr" sourceRef="doUpdateVfModulePrep" targetRef="CallActivity_12if1z7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x3xeba" sourceRef="CallActivity_12if1z7" targetRef="completionHandlerPrep" />
+ <bpmn2:callActivity id="CallActivity_1mn9pxh" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_01yr04k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rfmnuo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_01yr04k" sourceRef="completionHandlerPrep" targetRef="CallActivity_1mn9pxh" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfraV2">
+ <bpmndi:BPMNShape id="StartEvent_0twxl8d_di" bpmnElement="StartEvent_1">
+ <dc:Bounds x="191" y="241" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="198" y="281" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_07r1tup_di" bpmnElement="SequenceFlow_07r1tup">
+ <di:waypoint xsi:type="dc:Point" x="227" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="282" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01hwh3t_di" bpmnElement="checkPserverFlag">
+ <dc:Bounds x="581" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0f4oi4p_di" bpmnElement="preProcessRequest">
+ <dc:Bounds x="282" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03hqi4p_di" bpmnElement="sendSynchResponse">
+ <dc:Bounds x="430" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1s24r7g_di" bpmnElement="vfFlagCheck">
+ <dc:Bounds x="722" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1tjbc0n_di" bpmnElement="lockAppC">
+ <dc:Bounds x="1000" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0jqyljl_di" bpmnElement="healthCheckAppC">
+ <dc:Bounds x="1137" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xd9t6y_di" bpmnElement="healthDiagnosticSDNO">
+ <dc:Bounds x="369" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_07v5qul_di" bpmnElement="stopVfModuleController">
+ <dc:Bounds x="521" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1fhh3ik_di" bpmnElement="healthCheckController">
+ <dc:Bounds x="521" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0y2p8lc_di" bpmnElement="startVfModuleController">
+ <dc:Bounds x="672" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0getlx7_di" bpmnElement="vFFlagUnset">
+ <dc:Bounds x="809" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_13ngoxl_di" bpmnElement="unlockAppC">
+ <dc:Bounds x="955" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_023ov5w_di" bpmnElement="postUpgradeHealthCheckController">
+ <dc:Bounds x="1103" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04cyigk_di" bpmnElement="SequenceFlow_04cyigk">
+ <di:waypoint xsi:type="dc:Point" x="382" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="361" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09izs9b_di" bpmnElement="SequenceFlow_09izs9b">
+ <di:waypoint xsi:type="dc:Point" x="530" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="581" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="510.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gyzpu9_di" bpmnElement="SequenceFlow_0gyzpu9">
+ <di:waypoint xsi:type="dc:Point" x="681" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="656.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pqikpt_di" bpmnElement="SequenceFlow_1pqikpt">
+ <di:waypoint xsi:type="dc:Point" x="469" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="373" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cskhwy_di" bpmnElement="SequenceFlow_0cskhwy">
+ <di:waypoint xsi:type="dc:Point" x="621" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646.5" y="512" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_067f4jv_di" bpmnElement="SequenceFlow_067f4jv">
+ <di:waypoint xsi:type="dc:Point" x="772" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="790.5" y="512" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1trqy93_di" bpmnElement="SequenceFlow_1trqy93">
+ <di:waypoint xsi:type="dc:Point" x="909" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="932" y="512" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fc550l_di" bpmnElement="SequenceFlow_0fc550l">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1079" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1079" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1103" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1094" y="527" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uquo5r_di" bpmnElement="SequenceFlow_1uquo5r">
+ <di:waypoint xsi:type="dc:Point" x="1203" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1254" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1254" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="1304" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1224" y="527" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00bft3s_di" bpmnElement="doUpdateVfModulePrep">
+ <dc:Bounds x="672" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00moxf8_di" bpmnElement="completionHandlerPrep">
+ <dc:Bounds x="955" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_02qf1er_di" bpmnElement="setSuccessIndicator">
+ <dc:Bounds x="369" y="493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ozbxok_di" bpmnElement="SequenceFlow_1ozbxok">
+ <di:waypoint xsi:type="dc:Point" x="1100" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="1137" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1073.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17c5hhe_di" bpmnElement="SequenceFlow_17c5hhe">
+ <di:waypoint xsi:type="dc:Point" x="1187" y="299" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="324" />
+ <di:waypoint xsi:type="dc:Point" x="419" y="324" />
+ <di:waypoint xsi:type="dc:Point" x="419" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="758" y="303" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m6q3pf_di" bpmnElement="SequenceFlow_0m6q3pf">
+ <di:waypoint xsi:type="dc:Point" x="621" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646.5" y="373" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vj0wfl_di" bpmnElement="SequenceFlow_0vj0wfl">
+ <di:waypoint xsi:type="dc:Point" x="469" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="512" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_12zreeo_di" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1304" y="515" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1313" y="555" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16xzdgi_di" bpmnElement="SequenceFlow_16xzdgi">
+ <di:waypoint xsi:type="dc:Point" x="822" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="872" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="847" y="238" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oa0jsk_di" bpmnElement="SequenceFlow_1oa0jsk">
+ <di:waypoint xsi:type="dc:Point" x="972" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="1000" y="259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="238" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0zgcd21_di" bpmnElement="vfFlagSet">
+ <dc:Bounds x="872" y="219" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rfmnuo_di" bpmnElement="SequenceFlow_1rfmnuo">
+ <di:waypoint xsi:type="dc:Point" x="1153" y="436" />
+ <di:waypoint xsi:type="dc:Point" x="1153" y="465" />
+ <di:waypoint xsi:type="dc:Point" x="419" y="465" />
+ <di:waypoint xsi:type="dc:Point" x="419" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="741" y="444" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_12if1z7_di" bpmnElement="CallActivity_12if1z7">
+ <dc:Bounds x="809" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ykv4yr_di" bpmnElement="SequenceFlow_1ykv4yr">
+ <di:waypoint xsi:type="dc:Point" x="772" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="790.5" y="373" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x3xeba_di" bpmnElement="SequenceFlow_1x3xeba">
+ <di:waypoint xsi:type="dc:Point" x="909" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="932" y="373" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1mn9pxh_di" bpmnElement="CallActivity_1mn9pxh">
+ <dc:Bounds x="1103" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01yr04k_di" bpmnElement="SequenceFlow_01yr04k">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1103" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1079" y="373" 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/process/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
new file mode 100644
index 0000000000..078d72a1d8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
@@ -0,0 +1,517 @@
+<?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="_ZBLUcCkQEeaY6ZhIaNLwzg" 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="UpdateVfModuleVolumeInfraV1" name="UpdateVfModuleVolumeInfraV1" isExecutable="true">
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_completionHandler" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModVol_CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="CMSO_ResponseCode" target="UPDVfModVol_CMSO_ResponseCode" />
+ <camunda:out source="CMSO_ErrorResponse" target="UPDVfModVol_CMSO_ErrorResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_completionHandler" targetRef="ScriptTask_postProcessTemp" />
+ <bpmn2:serviceTask id="ServiceTask_callUpdateInfraDb" name="Call Update Infra DB">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
+ <camunda:inputParameter name="payload">${UPDVfModVol_updateInfraRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">aapplication/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="UPDVfModVol_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ServiceTask_callUpdateInfraDb" targetRef="ScriptTask_prepCompletionHandlerRequest" />
+ <bpmn2:scriptTask id="ScriptTask_prepVnfRest" name="Prepare VNF Adapter Rest Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepVnfAdapterRest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_prepVnfRest" targetRef="CallActivity_callVNFAdapterRest" />
+ <bpmn2:scriptTask id="ScriptTask_prepCompletionHandlerRequest" name="Prep Completion Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepCompletionHandlerRequest', execution, UPDVfModVol_requestId, 'UPDATE', UPDVfModVol_source, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_prepCompletionHandlerRequest" targetRef="CallActivity_completionHandler" />
+ <bpmn2:callActivity id="CallActivity_callVNFAdapterRest" name="VNFAdapterRest" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:out source="vnfAdapterRestV1Response" target="UPDVfModVol_vnfAdapterRestResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="UPDVfModVol_vnfAdapterRestRequest" target="vnfAdapterRestV1Request" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callVNFAdapterRest" targetRef="ScriptTask_prepDbInfraRequest" />
+ <bpmn2:scriptTask id="ScriptTask_prepDbInfraRequest" name="Prep DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepDbInfraDbRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_prepDbInfraRequest" targetRef="ServiceTask_callUpdateInfraDb" />
+ <bpmn2:scriptTask id="ScriptTask_postProcessTemp" name="Set Success" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleVolumeSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_postProcessTemp" targetRef="EndEvent_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_noVfModuleRelation</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_personaModelIdMatchYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:subProcess id="SubProcess_errorHandler" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ScriptTask_preFalloutHandler" />
+ <bpmn2:scriptTask id="ScriptTask_preFalloutHandler" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepFalloutHandler', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preFalloutHandler" targetRef="CallActivity_falloutHandler" />
+ <bpmn2:callActivity id="CallActivity_falloutHandler" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="FH_ResponseCode" target="UPDVfModVol_FH_ResponseCode" />
+ <camunda:out source="FH_ErrorResponse" target="UPDVfModVol_FH_ErrorResponse" />
+ <camunda:out source="FalloutHandlerResponse" target="UPDVfModVol_FalloutHandlerResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="CallActivity_falloutHandler" targetRef="EndEvent_3" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_prepVnfRest" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_personaModelIdMatch" name="Persona Model ID match?" default="SequenceFlow_personaModelidMatchNo">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_personaModelIdMatchYes</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_personaModelidMatchNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_personaModelIdMatchYes" name="Yes" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_modelInvariantId == UPDVfModVol_personaModelId}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_personaModelidMatchNo" name="No" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ScriptTask_handlePersonaModelIdMismatch" />
+ <bpmn2:scriptTask id="ScriptTask_queryAaiForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_YesVfModuleRelation</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVfModule', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_queryAaiForVfModule" targetRef="ExclusiveGateway_personaModelIdMatch" />
+ <bpmn2:scriptTask id="ScriptTask_handlePersonaModelIdMismatch" name="Handle Persona Model ID Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_personaModelidMatchNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handlePersonaModelIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_handlePersonaModelIdMismatch" targetRef="EndEvent_personaModelIdMismatch" />
+ <bpmn2:endEvent id="EndEvent_personaModelIdMismatch">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Pre-process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSynchResponse" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_preProcessRequest" />
+ <bpmn2:scriptTask id="ScriptTask_sendSynchResponse" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('sendSynchResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_sendSynchResponse" targetRef="ScriptTask_queryAaiGenricVnf" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="VF-MODULE relation?" default="SequenceFlow_noVfModuleRelation">
+ <bpmn2:incoming>SequenceFlow_tenantIsMatch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_YesVfModuleRelation</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_noVfModuleRelation</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_YesVfModuleRelation" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_queryAaiForVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{UPDVfModVol_relatedVfModuleLink != ''}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_noVfModuleRelation" name="No" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isTenantMatch" name="TenantId Match?" default="SequenceFlow_NoTenantMatch">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_NoTenantMatch</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_tenantIsMatch</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_NoTenantMatch" name="No" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ScriptTask_tenantIdMismatch" />
+ <bpmn2:sequenceFlow id="SequenceFlow_tenantIsMatch" name="Yes" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ExclusiveGateway_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_tenantId == UPDVfModVol_volumeGroupTenantId}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_tenantIdMismatch" name="Handle TenantId Mismatch" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_NoTenantMatch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_tenantIdMismatch" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_76" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_queryAAI" name="Query AAI for Volume Group Info" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_queryAAI" targetRef="ExclusiveGateway_isTenantMatch" />
+ <bpmn2:scriptTask id="ScriptTask_queryAaiGenricVnf" name="Query AAI for Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_queryAaiGenricVnf" targetRef="ScriptTask_queryAAI" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_62" bpmnElement="StartEvent_1">
+ <dc:Bounds x="191" y="131" width="37" height="37" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="192" y="173" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_StartEvent_62" targetElement="_BPMNShape_ScriptTask_231">
+ <di:waypoint xsi:type="dc:Point" x="227" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="268" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="268" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="150" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="248" y="149" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_42" bpmnElement="CallActivity_callVNFAdapterRest">
+ <dc:Bounds x="591" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_230" bpmnElement="ScriptTask_postProcessTemp">
+ <dc:Bounds x="1318" y="420" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_231" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds x="295" y="111" width="109" height="78" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_232" bpmnElement="ScriptTask_sendSynchResponse">
+ <dc:Bounds x="454" y="112" width="109" height="76" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_231" targetElement="_BPMNShape_ScriptTask_232">
+ <di:waypoint xsi:type="dc:Point" x="403" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="150" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="418" y="150" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_233" bpmnElement="ScriptTask_prepDbInfraRequest">
+ <dc:Bounds x="730" y="420" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_101" bpmnElement="ServiceTask_callUpdateInfraDb">
+ <dc:Bounds x="868" y="420" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_233" targetElement="_BPMNShape_ServiceTask_101">
+ <di:waypoint xsi:type="dc:Point" x="838" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="868" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="853" y="491" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ServiceTask_101" targetElement="_BPMNShape_ScriptTask_234">
+ <di:waypoint xsi:type="dc:Point" x="976" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="1014" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="959" y="497" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_prepCompletionHandlerRequest">
+ <dc:Bounds x="1014" y="420" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_43" bpmnElement="CallActivity_completionHandler">
+ <dc:Bounds x="1162" y="429" width="109" height="61" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_CallActivity_43">
+ <di:waypoint xsi:type="dc:Point" x="1122" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="1162" y="459" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="477" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_43" targetElement="_BPMNShape_ScriptTask_230">
+ <di:waypoint xsi:type="dc:Point" x="1270" y="459" />
+ <di:waypoint xsi:type="dc:Point" x="1318" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1216" y="521" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_235" bpmnElement="ScriptTask_queryAAI">
+ <dc:Bounds x="742" y="113" width="109" height="73" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_126" bpmnElement="ExclusiveGateway_isTenantMatch" isMarkerVisible="true">
+ <dc:Bounds x="931" y="132" width="34" height="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="113" width="102" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_tenantIdMismatch">
+ <dc:Bounds x="1064" y="112" width="97" height="75" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_235" targetElement="_BPMNShape_ExclusiveGateway_126">
+ <di:waypoint xsi:type="dc:Point" x="850" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="931" y="149" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="877" y="149" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_NoTenantMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ScriptTask_236">
+ <di:waypoint xsi:type="dc:Point" x="965" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="1064" y="149" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="149" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1225" y="125" width="49" height="49" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1249" y="179" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_236" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="1160" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="1225" y="149" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1179" y="149" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_tenantIsMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ExclusiveGateway_254">
+ <di:waypoint xsi:type="dc:Point" x="948" y="166" />
+ <di:waypoint xsi:type="dc:Point" x="948" y="244" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="915" y="173" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_42" targetElement="_BPMNShape_ScriptTask_233">
+ <di:waypoint xsi:type="dc:Point" x="691" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="730" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="712" y="531" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_232" targetElement="_BPMNShape_ScriptTask_318">
+ <di:waypoint xsi:type="dc:Point" x="562" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="581" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="581" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="612" y="149" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="578" y="150" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_prepVnfRest">
+ <dc:Bounds x="454" y="420" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_CallActivity_42">
+ <di:waypoint xsi:type="dc:Point" x="562" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="591" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="446" y="460" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_18" bpmnElement="SubProcess_errorHandler" isExpanded="true">
+ <dc:Bounds x="250" y="786" width="781" height="187" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_catchAllErrors">
+ <dc:Bounds x="301" y="844" width="37" height="37" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="270" y="886" width="98" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="ScriptTask_preFalloutHandler">
+ <dc:Bounds x="445" y="832" width="109" height="61" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_44" bpmnElement="CallActivity_falloutHandler">
+ <dc:Bounds x="639" y="832" width="109" height="61" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_238" targetElement="_BPMNShape_CallActivity_44">
+ <di:waypoint xsi:type="dc:Point" x="553" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="946" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_170" bpmnElement="EndEvent_3">
+ <dc:Bounds x="862" y="844" width="37" height="37" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="886" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_CallActivity_44" targetElement="_BPMNShape_EndEvent_170">
+ <di:waypoint xsi:type="dc:Point" x="747" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="862" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="765" y="1030" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_171" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1461" y="438" width="43" height="43" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1457" y="486" width="50" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ScriptTask_230" targetElement="_BPMNShape_EndEvent_171">
+ <di:waypoint xsi:type="dc:Point" x="1426" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="1461" y="459" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1442" y="467" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_238">
+ <di:waypoint xsi:type="dc:Point" x="337" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="445" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="385" y="1030" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="931" y="244" width="34" height="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="881" y="283" width="135" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_YesVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_313">
+ <di:waypoint xsi:type="dc:Point" x="931" y="261" />
+ <di:waypoint xsi:type="dc:Point" x="634" y="261" />
+ <di:waypoint xsi:type="dc:Point" x="634" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="262" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="729" y="261" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="ScriptTask_queryAaiForVfModule">
+ <dc:Bounds x="297" y="222" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_personaModelIdMatch" isMarkerVisible="true">
+ <dc:Bounds x="333" y="346" width="34" height="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="272" y="385" width="156" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_313" targetElement="_BPMNShape_ExclusiveGateway_255">
+ <di:waypoint xsi:type="dc:Point" x="350" y="302" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="329" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="346" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="347" y="318" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_personaModelIdMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="367" y="363" />
+ <di:waypoint xsi:type="dc:Point" x="491" y="363" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="398" y="363" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="491" y="346" width="34" height="34" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="385" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_noVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="948" y="278" />
+ <di:waypoint xsi:type="dc:Point" x="948" y="363" />
+ <di:waypoint xsi:type="dc:Point" x="701" y="363" />
+ <di:waypoint xsi:type="dc:Point" x="525" y="363" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="795" y="363" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_personaModelidMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_315">
+ <di:waypoint xsi:type="dc:Point" x="350" y="380" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="350" y="409" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="ScriptTask_handlePersonaModelIdMismatch">
+ <dc:Bounds x="297" y="460" width="109" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_172" bpmnElement="EndEvent_personaModelIdMismatch">
+ <dc:Bounds x="330" y="600" width="43" height="43" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="351" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_172">
+ <di:waypoint xsi:type="dc:Point" x="351" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="600" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="560" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_ScriptTask_237">
+ <di:waypoint xsi:type="dc:Point" x="508" y="380" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="420" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="ScriptTask_queryAaiGenricVnf">
+ <dc:Bounds x="612" y="112" width="97" height="75" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_ScriptTask_235">
+ <di:waypoint xsi:type="dc:Point" x="708" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="742" y="149" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVnfInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVnfInfra.bpmn
new file mode 100644
index 0000000000..e50eb7f805
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateVnfInfra.bpmn
@@ -0,0 +1,1685 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="UpdateVnfInfra" name="UpdateVnfInfra" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y0jt4l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="Task_1rxiqe1" targetRef="ExclusiveGateway_045e1uz" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessRequest" targetRef="ScriptTask_1" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1dqbqqx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.completionHandlerPrep(execution, 'CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="Task_07rej8l" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0slcwxc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.falloutHandlerPrep(execution, 'FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a0lfh8" sourceRef="Task_07rej8l" targetRef="Task_18twhln" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0r0o5yt" sourceRef="Task_18twhln" targetRef="Task_16v4gow" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0slcwxc" sourceRef="Task_16v4gow" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="Task_07rej8l" name="PreProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a0lfh8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_16v4gow" name="PostProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0r0o5yt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0slcwxc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_18twhln" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0a0lfh8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0r0o5yt</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVnfAndModules" calledElement="DoUpdateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="requestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="usePreload" target="usePreload" />
+ <camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" />
+ <camunda:in source="vfModuleInputParams" target="vfModuleInputParams" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19ba94v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gzzeru</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1w35ov3" sourceRef="Task_1gg76h7" targetRef="Task_1opcb4j" />
+ <bpmn2:callActivity id="Task_1gg76h7" name="Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0y0jt4l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w35ov3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_155eyrq" />
+ <bpmn2:scriptTask id="Task_1opcb4j" name="Get VnfResourceDecomposition" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1w35ov3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_053qjfy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.getVnfResourceDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0y0jt4l" sourceRef="ScriptTask_1" targetRef="Task_1gg76h7" />
+ <bpmn2:scriptTask id="Task_1rxiqe1" name="Check If VNF Is In Maintenance in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16mo99z</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1pj72fw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.checkIfVnfInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0usxnlk" sourceRef="Task_0vy2zge" targetRef="ExclusiveGateway_0q323wc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1bkhs8m" name="no" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="Task_1dtbnuy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0gzzeru" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_0ulrq9g" />
+ <bpmn2:scriptTask id="Task_0ap39ka" name="Set VNF inMaintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0baosqi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1lmijmb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k3fx7p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.setVnfInMaintFlagInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1drglpt" name="Unset VNF In Maintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19lg15d</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_11p8elx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12mfil6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.setVnfInMaintFlagInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0vy2zge" name="Check If Physical Servers Are Locked in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_178fxkj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0usxnlk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.checkIfPserversInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xx8y1s" sourceRef="Task_1dtbnuy" targetRef="ExclusiveGateway_1slvyx2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a6pdza" sourceRef="Task_1fj63ov" targetRef="ExclusiveGateway_1ichg7h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13h26h9" sourceRef="Task_1cfkcss" targetRef="ExclusiveGateway_1etgtgi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1uno5rs" sourceRef="Task_1hdg951" targetRef="ExclusiveGateway_02tj4dw" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c79909" sourceRef="Task_1ca5ctq" targetRef="ExclusiveGateway_1gn5lab" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xfbwpi" sourceRef="Task_1sove95" targetRef="ExclusiveGateway_06mv93h" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0q323wc" name="Error on PServers Check?" default="SequenceFlow_16mo99z">
+ <bpmn2:incoming>SequenceFlow_0usxnlk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16mo99z</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1esmtgy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16mo99z" name="no" sourceRef="ExclusiveGateway_0q323wc" targetRef="Task_1rxiqe1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045e1uz" name="Error On inMaintenance Check?" default="SequenceFlow_0baosqi">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0baosqi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1jmzl1j</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0baosqi" name="no" sourceRef="ExclusiveGateway_045e1uz" targetRef="Task_0ap39ka" />
+ <bpmn2:callActivity id="Task_0q5cdit" name="Rainy Day Handler" calledElement="RainyDayHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="nfRole" target="vnfType" />
+ <camunda:in source="currentActivity" target="currentActivity" />
+ <camunda:in source="workStep" target="workStep" />
+ <camunda:in source="failedActivity" target="failedActivity" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="errorText" target="errorText" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="handlingCode" target="disposition" />
+ <camunda:in source="requestorId" target="requestorId" />
+ <camunda:out source="taskId" target="taskId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1nplvhi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0v0u7mf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0v0u7mf" sourceRef="Task_0q5cdit" targetRef="ExclusiveGateway_0xlxgl0" />
+ <bpmn2:task id="Task_0zbogrm" name="Rollback Processing">
+ <bpmn2:incoming>SequenceFlow_1qr8msw</bpmn2:incoming>
+ </bpmn2:task>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vpd06n" name="Abort" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_1tg549h">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Abort"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qr8msw" name="Rollback" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_0zbogrm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Rollback"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ud5uwa" name="Eror on inMaintenance Set?" default="SequenceFlow_1bkhs8m">
+ <bpmn2:incoming>SequenceFlow_0k3fx7p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bkhs8m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_010ynjs</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3fx7p" sourceRef="Task_0ap39ka" targetRef="ExclusiveGateway_0ud5uwa" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1slvyx2" name="Error on VNF Lock?" default="SequenceFlow_0qy68ib">
+ <bpmn2:incoming>SequenceFlow_0xx8y1s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qy68ib</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qsxbp4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qy68ib" name="no" sourceRef="ExclusiveGateway_1slvyx2" targetRef="Task_1fj63ov" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1ichg7h" name="Error on Pre Health Check?" default="SequenceFlow_0q0qan8">
+ <bpmn2:incoming>SequenceFlow_0a6pdza</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q0qan8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15bl7wd</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0q0qan8" name="no" sourceRef="ExclusiveGateway_1ichg7h" targetRef="Task_1cfkcss" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1etgtgi" name="Error on VNF Stop?" default="SequenceFlow_1c0vdki">
+ <bpmn2:incoming>SequenceFlow_13h26h9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c0vdki</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1m84lq5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c0vdki" name="no" sourceRef="ExclusiveGateway_1etgtgi" targetRef="Task_0eae8go" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ulrq9g" name="Error on DoUpdateVnfAndNModules?" default="SequenceFlow_04zwhw4">
+ <bpmn2:incoming>SequenceFlow_0gzzeru</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04zwhw4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0fog99f</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_04zwhw4" name="no" sourceRef="ExclusiveGateway_0ulrq9g" targetRef="Task_1hdg951" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02tj4dw" name="Error on VNF Start?" default="SequenceFlow_162mm0m">
+ <bpmn2:incoming>SequenceFlow_1uno5rs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_162mm0m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12g63pl</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_162mm0m" name="no" sourceRef="ExclusiveGateway_02tj4dw" targetRef="Task_1ca5ctq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gn5lab" name="Error on Post Health Check?" default="SequenceFlow_197t3qk">
+ <bpmn2:incoming>SequenceFlow_1c79909</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_197t3qk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0l83v2k</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_197t3qk" name="no" sourceRef="ExclusiveGateway_1gn5lab" targetRef="Task_1sove95" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_06mv93h" name="Error on VNF Unlock?" default="SequenceFlow_19lg15d">
+ <bpmn2:incoming>SequenceFlow_1xfbwpi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19lg15d</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_07fhkt4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19lg15d" name="no" sourceRef="ExclusiveGateway_06mv93h" targetRef="Task_1drglpt" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0l2z6wc" name="Erorr on inMaintenance Unset?" default="SequenceFlow_3">
+ <bpmn2:incoming>SequenceFlow_12mfil6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0p94lgv</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_12mfil6" sourceRef="Task_1drglpt" targetRef="ExclusiveGateway_0l2z6wc" />
+ <bpmn2:scriptTask id="Task_1tg549h" name="Abort Processing" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vpd06n</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1c022sy</bpmn2:incoming>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.abortProcessing(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0xlxgl0" name="Check Disposition">
+ <bpmn2:incoming>SequenceFlow_0v0u7mf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vpd06n</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qr8msw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05gpym3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y82zzx" name="Which step to skip?" default="SequenceFlow_1c022sy">
+ <bpmn2:incoming>SequenceFlow_05gpym3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c022sy</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0tqrgop</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_126nlmw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0mw3mwl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_13md9cw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xylem3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1c5mxd5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0u8hiu2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0fs7ay9</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_00qwx4v</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_14s8ji9</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0kricor</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_05gpym3" name="Skip" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Skip"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19ba94v" sourceRef="Task_0eae8go" targetRef="ScriptTask_6" />
+ <bpmn2:scriptTask id="Task_0eae8go" name="Prepare DoUpdateVnfAndModules" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1c0vdki</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1hldqvv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19ba94v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.prepDoUpdateVnfAndModules(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c022sy" sourceRef="ExclusiveGateway_0y82zzx" targetRef="Task_1tg549h" />
+ <bpmn2:callActivity id="Task_1dtbnuy" name="Call APP-C VNF Lock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionLock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bkhs8m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0qmpjgv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xx8y1s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1fj63ov" name="Call APP-C Health Check" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qy68ib</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0tld38t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a6pdza</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1cfkcss" name="Call APP-C VNF Graceful Stop" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStop" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="aicIdentity" target="aicIdentity" />
+ <camunda:out source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0q0qan8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08dyt3l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13h26h9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1hdg951" name="Call APP-C VNF Start" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStart" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="aicIdentity" target="aicIdentity" />
+ <camunda:out source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04zwhw4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ye8oij</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uno5rs</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1ca5ctq" name="Call APP-C Health Check" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex1" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_162mm0m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08kn9ok</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c79909</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1sove95" name="Call APP-C VNF Unlock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUnlock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_197t3qk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_02uiht9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xfbwpi</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0wc37af" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1esmtgy</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1r18wa8" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1jmzl1j</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1esmtgy" name="yes" sourceRef="ExclusiveGateway_0q323wc" targetRef="IntermediateThrowEvent_0wc37af">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jmzl1j" name="yes" sourceRef="ExclusiveGateway_045e1uz" targetRef="IntermediateThrowEvent_1r18wa8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0k7j3qf" name="To inMaintenance Check">
+ <bpmn2:outgoing>SequenceFlow_1pj72fw</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Check" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pj72fw" sourceRef="IntermediateThrowEvent_0k7j3qf" targetRef="Task_1rxiqe1" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1urs7gm" name="To inMaintenance Set">
+ <bpmn2:outgoing>SequenceFlow_1lmijmb</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Set" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lmijmb" sourceRef="IntermediateThrowEvent_1urs7gm" targetRef="Task_0ap39ka" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0wx980v" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_010ynjs</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_010ynjs" name="yes" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="IntermediateThrowEvent_0wx980v">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1khl6dg" name="To VNF Lock">
+ <bpmn2:outgoing>SequenceFlow_0qmpjgv</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_11rri8p" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1qsxbp4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0frizqo" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_15bl7wd</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gmhr39" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1m84lq5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1m2d0qt" name="To Health PreCheck">
+ <bpmn2:outgoing>SequenceFlow_0tld38t</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0p4hkug" name="To VNF Stop">
+ <bpmn2:outgoing>SequenceFlow_08dyt3l</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Stop" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qsxbp4" name="yes" sourceRef="ExclusiveGateway_1slvyx2" targetRef="IntermediateThrowEvent_11rri8p">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qmpjgv" sourceRef="IntermediateThrowEvent_1khl6dg" targetRef="Task_1dtbnuy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tld38t" sourceRef="IntermediateThrowEvent_1m2d0qt" targetRef="Task_1fj63ov" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15bl7wd" name="yes" sourceRef="ExclusiveGateway_1ichg7h" targetRef="IntermediateThrowEvent_0frizqo">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_08dyt3l" sourceRef="IntermediateThrowEvent_0p4hkug" targetRef="Task_1cfkcss" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1m84lq5" name="yes" sourceRef="ExclusiveGateway_1etgtgi" targetRef="IntermediateThrowEvent_1gmhr39">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1s7fnzf" name="To DoUpdateVnfAndModules">
+ <bpmn2:outgoing>SequenceFlow_1hldqvv</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To DoUpdateVnfAndModules" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1p2yktm" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0fog99f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_17j7yap" name="To VNF Start">
+ <bpmn2:outgoing>SequenceFlow_0ye8oij</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Start" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gjzx99" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_12g63pl</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hldqvv" sourceRef="IntermediateThrowEvent_1s7fnzf" targetRef="Task_0eae8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0fog99f" name="yes" sourceRef="ExclusiveGateway_0ulrq9g" targetRef="IntermediateThrowEvent_1p2yktm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ye8oij" sourceRef="IntermediateThrowEvent_17j7yap" targetRef="Task_1hdg951" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12g63pl" name="yes" sourceRef="ExclusiveGateway_02tj4dw" targetRef="IntermediateThrowEvent_1gjzx99">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_03lb8ti" name="To Health PostCheck">
+ <bpmn2:outgoing>SequenceFlow_08kn9ok</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1umr8ik" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0l83v2k</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_044oajb" name="To VNF Unlock">
+ <bpmn2:outgoing>SequenceFlow_02uiht9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1c1s0hp" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_07fhkt4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_11i6md0" name="To inMaintenance Unset">
+ <bpmn2:outgoing>SequenceFlow_11p8elx</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenance Unset" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1d8c9i0" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0p94lgv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_08kn9ok" sourceRef="IntermediateThrowEvent_03lb8ti" targetRef="Task_1ca5ctq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0l83v2k" name="yes" sourceRef="ExclusiveGateway_1gn5lab" targetRef="IntermediateThrowEvent_1umr8ik">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_02uiht9" sourceRef="IntermediateThrowEvent_044oajb" targetRef="Task_1sove95" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07fhkt4" name="yes" sourceRef="ExclusiveGateway_06mv93h" targetRef="IntermediateThrowEvent_1c1s0hp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_11p8elx" sourceRef="IntermediateThrowEvent_11i6md0" targetRef="Task_1drglpt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0p94lgv" name="yes" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="IntermediateThrowEvent_1d8c9i0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dqbqqx" sourceRef="IntermediateThrowEvent_0xv558x" targetRef="ScriptTask_10" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0xv558x" name="To Completion Handler Prep">
+ <bpmn2:outgoing>SequenceFlow_1dqbqqx</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0hljxy3" name="To Rainy Day Handling">
+ <bpmn2:outgoing>SequenceFlow_1nplvhi</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1nplvhi" sourceRef="IntermediateThrowEvent_0hljxy3" targetRef="Task_0q5cdit" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tqrgop" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_08j8zjs">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "checkIfPserversInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_126nlmw" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0tj8iiy">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "checkIfVnfInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0mw3mwl" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0oeqjo1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "setVnfInMaintFlagInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_13md9cw" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1939dn7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Lock"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xylem3" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1rn3nlo">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "HealthCheck0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c5mxd5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0weaigg">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Stop"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u8hiu2" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1q8mns4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "doUpdateVnfAndModules"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0fs7ay9" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_16kgzdv">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Start"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_00qwx4v" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_18v3win">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "HealthCheck1"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_14s8ji9" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0kypyu0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "Unlock"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0kricor" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_024m4nk">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_08j8zjs" name="To inMaintenance Check">
+ <bpmn2:incoming>SequenceFlow_0tqrgop</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Check" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0tj8iiy" name="To inMaintenance Set">
+ <bpmn2:incoming>SequenceFlow_126nlmw</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Set" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0oeqjo1" name="To VNF Lock">
+ <bpmn2:incoming>SequenceFlow_0mw3mwl</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1939dn7" name="To Health PreCheck">
+ <bpmn2:incoming>SequenceFlow_13md9cw</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1rn3nlo" name="To VNF Stop">
+ <bpmn2:incoming>SequenceFlow_0xylem3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Stop" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0weaigg" name="To DoUpdateVnfAndModules">
+ <bpmn2:incoming>SequenceFlow_1c5mxd5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To DoUpdateVnfAndModules" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1q8mns4" name="To VNF Start">
+ <bpmn2:incoming>SequenceFlow_0u8hiu2</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Start" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16kgzdv" name="To Health PostCheck">
+ <bpmn2:incoming>SequenceFlow_0fs7ay9</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_18v3win" name="To VNF Unlock">
+ <bpmn2:incoming>SequenceFlow_00qwx4v</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0kypyu0" name="To inMaintenance Unset">
+ <bpmn2:incoming>SequenceFlow_14s8ji9</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenance Unset" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_024m4nk" name="To Completion Handler Prep">
+ <bpmn2:incoming>SequenceFlow_0kricor</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_178fxkj" sourceRef="Task_155eyrq" targetRef="Task_0vy2zge" />
+ <bpmn2:scriptTask id="Task_155eyrq" name="Query A&#38;AI for VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_178fxkj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new UpdateVnfInfra()
+uvfm.queryAAIForVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVnfInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="97" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="113" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="589" y="1222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="588" y="1263" width="38" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="133" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="209" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="309" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="373" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="525" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="433" y="1200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="533" y="1240" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="1240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="710" y="1081" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="133" y="1200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="283" y="1200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="233" y="1240" />
+ <di:waypoint xsi:type="dc:Point" x="283" y="1240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="1246" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="88" y="1464" width="966" height="240" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="152" y="1558" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131" y="1599" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="621" y="1536" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="188" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="220" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="1561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="721" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="789" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="1576" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="945" y="1558" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="963" y="1599" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="1036" y="1558" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1054" y="1599" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1164" y="1558" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1182" y="1599" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="1164" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1118" y="1561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="789" y="1536" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="383" y="1240" />
+ <di:waypoint xsi:type="dc:Point" x="433" y="1240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="1208" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="889" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="945" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="782" y="1636" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="419" y="685" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="932" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="1007" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="1007" y="1158" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="1160" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="1240" />
+ <di:waypoint xsi:type="dc:Point" x="133" y="1240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="961" y="954.3909136697287" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w35ov3_di" bpmnElement="SequenceFlow_1w35ov3">
+ <di:waypoint xsi:type="dc:Point" x="655" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0qfx7sz_di" bpmnElement="Task_1gg76h7">
+ <dc:Bounds x="555" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_053qjfy_di" bpmnElement="SequenceFlow_053qjfy">
+ <di:waypoint xsi:type="dc:Point" x="818" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="845" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08xzuox_di" bpmnElement="Task_1opcb4j">
+ <dc:Bounds x="718" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y0jt4l_di" bpmnElement="SequenceFlow_0y0jt4l">
+ <di:waypoint xsi:type="dc:Point" x="473" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="514" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19pf9z8_di" bpmnElement="Task_1rxiqe1">
+ <dc:Bounds x="425" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0usxnlk_di" bpmnElement="SequenceFlow_0usxnlk">
+ <di:waypoint xsi:type="dc:Point" x="231" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="262" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bkhs8m_di" bpmnElement="SequenceFlow_1bkhs8m">
+ <di:waypoint xsi:type="dc:Point" x="921" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="994" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="994" y="391" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="391" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="950" y="212" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gzzeru_di" bpmnElement="SequenceFlow_0gzzeru">
+ <di:waypoint xsi:type="dc:Point" x="519" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="595" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="710" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wa4zya_di" bpmnElement="Task_0ap39ka">
+ <dc:Bounds x="714" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sgm9bu_di" bpmnElement="Task_1drglpt">
+ <dc:Bounds x="718" y="943" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16jtt5t_di" bpmnElement="Task_0vy2zge">
+ <dc:Bounds x="131" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xx8y1s_di" bpmnElement="SequenceFlow_0xx8y1s">
+ <di:waypoint xsi:type="dc:Point" x="239" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="459" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a6pdza_di" bpmnElement="SequenceFlow_0a6pdza">
+ <di:waypoint xsi:type="dc:Point" x="525" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="459" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13h26h9_di" bpmnElement="SequenceFlow_13h26h9">
+ <di:waypoint xsi:type="dc:Point" x="814" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="459" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uno5rs_di" bpmnElement="SequenceFlow_1uno5rs">
+ <di:waypoint xsi:type="dc:Point" x="812" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="850" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="850" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="865" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c79909_di" bpmnElement="SequenceFlow_1c79909">
+ <di:waypoint xsi:type="dc:Point" x="239" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="968" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xfbwpi_di" bpmnElement="SequenceFlow_1xfbwpi">
+ <di:waypoint xsi:type="dc:Point" x="515" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="968" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0q323wc_di" bpmnElement="ExclusiveGateway_0q323wc" isMarkerVisible="true">
+ <dc:Bounds x="291.803" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="175" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16mo99z_di" bpmnElement="SequenceFlow_16mo99z">
+ <di:waypoint xsi:type="dc:Point" x="342" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="373" y="213" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045e1uz_di" bpmnElement="ExclusiveGateway_045e1uz" isMarkerVisible="true">
+ <dc:Bounds x="601" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="168" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0baosqi_di" bpmnElement="SequenceFlow_0baosqi">
+ <di:waypoint xsi:type="dc:Point" x="651" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="714" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="673" y="214" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1k5n5d1_di" bpmnElement="Task_0q5cdit">
+ <dc:Bounds x="1132" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v0u7mf_di" bpmnElement="SequenceFlow_0v0u7mf">
+ <di:waypoint xsi:type="dc:Point" x="1232" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1314" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1273" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="Task_0zbogrm_di" bpmnElement="Task_0zbogrm">
+ <dc:Bounds x="1289" y="645" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vpd06n_di" bpmnElement="SequenceFlow_0vpd06n">
+ <di:waypoint xsi:type="dc:Point" x="1339" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="441" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="441" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1347" y="419.2626464646465" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qr8msw_di" bpmnElement="SequenceFlow_1qr8msw">
+ <di:waypoint xsi:type="dc:Point" x="1339" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="599" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="599" />
+ <di:waypoint xsi:type="dc:Point" x="1339" y="645" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1348" y="578.1951219512196" width="42" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ud5uwa_di" bpmnElement="ExclusiveGateway_0ud5uwa" isMarkerVisible="true">
+ <dc:Bounds x="871.1194471865745" y="211.86673247778873" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="859" y="167" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3fx7p_di" bpmnElement="SequenceFlow_0k3fx7p">
+ <di:waypoint xsi:type="dc:Point" x="814" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1slvyx2_di" bpmnElement="ExclusiveGateway_1slvyx2" isMarkerVisible="true">
+ <dc:Bounds x="292" y="449" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="283" y="413" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qy68ib_di" bpmnElement="SequenceFlow_0qy68ib">
+ <di:waypoint xsi:type="dc:Point" x="342" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="378" y="459" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ichg7h_di" bpmnElement="ExclusiveGateway_1ichg7h" isMarkerVisible="true">
+ <dc:Bounds x="601" y="449" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="414" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q0qan8_di" bpmnElement="SequenceFlow_0q0qan8">
+ <di:waypoint xsi:type="dc:Point" x="651" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="714" y="474" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="459" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1etgtgi_di" bpmnElement="ExclusiveGateway_1etgtgi" isMarkerVisible="true">
+ <dc:Bounds x="871" y="449" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="862" y="411" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c0vdki_di" bpmnElement="SequenceFlow_1c0vdki">
+ <di:waypoint xsi:type="dc:Point" x="921" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="1003" y="474" />
+ <di:waypoint xsi:type="dc:Point" x="1003" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="102" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="102" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="195" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="964" y="444.0001202928146" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ulrq9g_di" bpmnElement="ExclusiveGateway_0ulrq9g" isMarkerVisible="true">
+ <dc:Bounds x="595" y="700" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="578" y="658" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04zwhw4_di" bpmnElement="SequenceFlow_04zwhw4">
+ <di:waypoint xsi:type="dc:Point" x="645" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="712" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="707.4465803421167" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02tj4dw_di" bpmnElement="ExclusiveGateway_02tj4dw" isMarkerVisible="true">
+ <dc:Bounds x="876" y="700" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="867" y="665" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_162mm0m_di" bpmnElement="SequenceFlow_162mm0m">
+ <di:waypoint xsi:type="dc:Point" x="926" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="1002" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="1002" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="94" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="94" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="961" y="701.1887293946602" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gn5lab_di" bpmnElement="ExclusiveGateway_1gn5lab" isMarkerVisible="true">
+ <dc:Bounds x="292" y="958" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="920" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_197t3qk_di" bpmnElement="SequenceFlow_197t3qk">
+ <di:waypoint xsi:type="dc:Point" x="342" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="415" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="955.268406786947" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06mv93h_di" bpmnElement="ExclusiveGateway_06mv93h" isMarkerVisible="true">
+ <dc:Bounds x="601" y="958" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="592" y="918" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19lg15d_di" bpmnElement="SequenceFlow_19lg15d">
+ <di:waypoint xsi:type="dc:Point" x="651" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="676" y="955.051282051282" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0l2z6wc_di" bpmnElement="ExclusiveGateway_0l2z6wc" isMarkerVisible="true">
+ <dc:Bounds x="882" y="958" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="870" y="915" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12mfil6_di" bpmnElement="SequenceFlow_12mfil6">
+ <di:waypoint xsi:type="dc:Point" x="818" y="983" />
+ <di:waypoint xsi:type="dc:Point" x="882" y="983" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850" y="968" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lb0lk5_di" bpmnElement="Task_1tg549h">
+ <dc:Bounds x="1289" y="315" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gmvi7n_di" bpmnElement="ExclusiveGateway_0xlxgl0" isMarkerVisible="true">
+ <dc:Bounds x="1314" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1303" y="468" width="88" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y82zzx_di" bpmnElement="ExclusiveGateway_0y82zzx" isMarkerVisible="true">
+ <dc:Bounds x="1431" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1421" y="542" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05gpym3_di" bpmnElement="SequenceFlow_05gpym3">
+ <di:waypoint xsi:type="dc:Point" x="1364" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1431" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1387" y="486.98705320489466" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ba94v_di" bpmnElement="SequenceFlow_19ba94v">
+ <di:waypoint xsi:type="dc:Point" x="295" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="419" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="376" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0rqgdju_di" bpmnElement="Task_0eae8go">
+ <dc:Bounds x="195" y="685" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c022sy_di" bpmnElement="SequenceFlow_1c022sy">
+ <di:waypoint xsi:type="dc:Point" x="1456" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="1456" y="355" />
+ <di:waypoint xsi:type="dc:Point" x="1389" y="355" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1471" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0tz2nj7_di" bpmnElement="Task_1dtbnuy">
+ <dc:Bounds x="139" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0m9b4r4_di" bpmnElement="Task_1fj63ov">
+ <dc:Bounds x="425" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1131t0j_di" bpmnElement="Task_1cfkcss">
+ <dc:Bounds x="714" y="434" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0x0eohw_di" bpmnElement="Task_1hdg951">
+ <dc:Bounds x="712" y="685" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1hv52rh_di" bpmnElement="Task_1ca5ctq">
+ <dc:Bounds x="139" y="943" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1wftk6z_di" bpmnElement="Task_1sove95">
+ <dc:Bounds x="415" y="943" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_09rkic6_di" bpmnElement="IntermediateThrowEvent_0wc37af">
+ <dc:Bounds x="299" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="351.616" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1mk2rqe_di" bpmnElement="IntermediateThrowEvent_1r18wa8">
+ <dc:Bounds x="608" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="352" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1esmtgy_di" bpmnElement="SequenceFlow_1esmtgy">
+ <di:waypoint xsi:type="dc:Point" x="317" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="274" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jmzl1j_di" bpmnElement="SequenceFlow_1jmzl1j">
+ <di:waypoint xsi:type="dc:Point" x="626" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="631" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0r5r5re_di" bpmnElement="IntermediateThrowEvent_0k7j3qf">
+ <dc:Bounds x="457" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="432" y="344" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pj72fw_di" bpmnElement="SequenceFlow_1pj72fw">
+ <di:waypoint xsi:type="dc:Point" x="475" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_04ceksx_di" bpmnElement="IntermediateThrowEvent_1urs7gm">
+ <dc:Bounds x="746" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="720" y="344" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lmijmb_di" bpmnElement="SequenceFlow_1lmijmb">
+ <di:waypoint xsi:type="dc:Point" x="764" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="779" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0rq7l0k_di" bpmnElement="IntermediateThrowEvent_0wx980v">
+ <dc:Bounds x="878" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="344" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_010ynjs_di" bpmnElement="SequenceFlow_010ynjs">
+ <di:waypoint xsi:type="dc:Point" x="896" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="896" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0lpduhk_di" bpmnElement="IntermediateThrowEvent_1khl6dg">
+ <dc:Bounds x="171" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="157" y="601.2375249500998" width="64" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1c2pwwh_di" bpmnElement="IntermediateThrowEvent_11rri8p">
+ <dc:Bounds x="299" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="602" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0vz2acu_di" bpmnElement="IntermediateThrowEvent_0frizqo">
+ <dc:Bounds x="608" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="602" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0tybfsi_di" bpmnElement="IntermediateThrowEvent_1gmhr39">
+ <dc:Bounds x="878" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="602" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1k86ayn_di" bpmnElement="IntermediateThrowEvent_1m2d0qt">
+ <dc:Bounds x="457" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="449" y="602" width="51" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0apaw6k_di" bpmnElement="IntermediateThrowEvent_0p4hkug">
+ <dc:Bounds x="746" y="566" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="733" y="602" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qsxbp4_di" bpmnElement="SequenceFlow_1qsxbp4">
+ <di:waypoint xsi:type="dc:Point" x="317" y="499" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="566" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="522.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qmpjgv_di" bpmnElement="SequenceFlow_0qmpjgv">
+ <di:waypoint xsi:type="dc:Point" x="189" y="566" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="541" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="541" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="514" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="541" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tld38t_di" bpmnElement="SequenceFlow_0tld38t">
+ <di:waypoint xsi:type="dc:Point" x="475" y="566" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="514" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15bl7wd_di" bpmnElement="SequenceFlow_15bl7wd">
+ <di:waypoint xsi:type="dc:Point" x="626" y="499" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="566" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="522.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08dyt3l_di" bpmnElement="SequenceFlow_08dyt3l">
+ <di:waypoint xsi:type="dc:Point" x="764" y="566" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="514" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="779" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1m84lq5_di" bpmnElement="SequenceFlow_1m84lq5">
+ <di:waypoint xsi:type="dc:Point" x="896" y="499" />
+ <di:waypoint xsi:type="dc:Point" x="896" y="566" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="522.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0v6yl7l_di" bpmnElement="IntermediateThrowEvent_1s7fnzf">
+ <dc:Bounds x="227" y="819" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="203" y="854.0179640718563" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0jr8fuh_di" bpmnElement="IntermediateThrowEvent_1p2yktm">
+ <dc:Bounds x="602" y="819" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="855" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_15k8xfs_di" bpmnElement="IntermediateThrowEvent_17j7yap">
+ <dc:Bounds x="744" y="819" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="730" y="855" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1kue0lc_di" bpmnElement="IntermediateThrowEvent_1gjzx99">
+ <dc:Bounds x="883" y="819" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="866" y="855" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hldqvv_di" bpmnElement="SequenceFlow_1hldqvv">
+ <di:waypoint xsi:type="dc:Point" x="245" y="819" />
+ <di:waypoint xsi:type="dc:Point" x="245" y="765" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="260" y="792" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fog99f_di" bpmnElement="SequenceFlow_0fog99f">
+ <di:waypoint xsi:type="dc:Point" x="620" y="750" />
+ <di:waypoint xsi:type="dc:Point" x="620" y="819" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="784.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ye8oij_di" bpmnElement="SequenceFlow_0ye8oij">
+ <di:waypoint xsi:type="dc:Point" x="762" y="819" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="765" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="792" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12g63pl_di" bpmnElement="SequenceFlow_12g63pl">
+ <di:waypoint xsi:type="dc:Point" x="901" y="750" />
+ <di:waypoint xsi:type="dc:Point" x="901" y="819" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="907" y="784.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1ad2ab4_di" bpmnElement="IntermediateThrowEvent_03lb8ti">
+ <dc:Bounds x="171" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="162" y="1118.566866267465" width="54" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1bj88jr_di" bpmnElement="IntermediateThrowEvent_1umr8ik">
+ <dc:Bounds x="299" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="1118.566866267465" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1a795jb_di" bpmnElement="IntermediateThrowEvent_044oajb">
+ <dc:Bounds x="447" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="428" y="1119" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0l74cfl_di" bpmnElement="IntermediateThrowEvent_1c1s0hp">
+ <dc:Bounds x="608" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="1119" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1vgxxf3_di" bpmnElement="IntermediateThrowEvent_11i6md0">
+ <dc:Bounds x="750" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="1119" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_08t3cq7_di" bpmnElement="IntermediateThrowEvent_1d8c9i0">
+ <dc:Bounds x="889" y="1083" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872" y="1119" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08kn9ok_di" bpmnElement="SequenceFlow_08kn9ok">
+ <di:waypoint xsi:type="dc:Point" x="189" y="1083" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="1023" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="1043" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0l83v2k_di" bpmnElement="SequenceFlow_0l83v2k">
+ <di:waypoint xsi:type="dc:Point" x="317" y="1008" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="1083" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="1035.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02uiht9_di" bpmnElement="SequenceFlow_02uiht9">
+ <di:waypoint xsi:type="dc:Point" x="465" y="1083" />
+ <di:waypoint xsi:type="dc:Point" x="465" y="1023" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="480" y="1043" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07fhkt4_di" bpmnElement="SequenceFlow_07fhkt4">
+ <di:waypoint xsi:type="dc:Point" x="626" y="1008" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="1083" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="1035.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11p8elx_di" bpmnElement="SequenceFlow_11p8elx">
+ <di:waypoint xsi:type="dc:Point" x="768" y="1083" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="1023" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="783" y="1043" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p94lgv_di" bpmnElement="SequenceFlow_0p94lgv">
+ <di:waypoint xsi:type="dc:Point" x="907" y="1008" />
+ <di:waypoint xsi:type="dc:Point" x="907" y="1083" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="1035.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dqbqqx_di" bpmnElement="SequenceFlow_1dqbqqx">
+ <di:waypoint xsi:type="dc:Point" x="181" y="1320" />
+ <di:waypoint xsi:type="dc:Point" x="182" y="1280" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="182" y="1285" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_11t1f0p_di" bpmnElement="IntermediateThrowEvent_0xv558x">
+ <dc:Bounds x="163" y="1320" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="145" y="1355.045908183633" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rgn1jk_di" bpmnElement="IntermediateThrowEvent_0hljxy3">
+ <dc:Bounds x="1051" y="492" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="528" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nplvhi_di" bpmnElement="SequenceFlow_1nplvhi">
+ <di:waypoint xsi:type="dc:Point" x="1087" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1132" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1110" y="485" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tqrgop_di" bpmnElement="SequenceFlow_0tqrgop">
+ <di:waypoint xsi:type="dc:Point" x="1462" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="1523" y="299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1493" y="380" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_126nlmw_di" bpmnElement="SequenceFlow_126nlmw">
+ <di:waypoint xsi:type="dc:Point" x="1466" y="495" />
+ <di:waypoint xsi:type="dc:Point" x="1569" y="327" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1518" y="396" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mw3mwl_di" bpmnElement="SequenceFlow_0mw3mwl">
+ <di:waypoint xsi:type="dc:Point" x="1469" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="1614" y="360" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1542" y="414" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13md9cw_di" bpmnElement="SequenceFlow_13md9cw">
+ <di:waypoint xsi:type="dc:Point" x="1472" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1652" y="403" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1562" y="437" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xylem3_di" bpmnElement="SequenceFlow_0xylem3">
+ <di:waypoint xsi:type="dc:Point" x="1476" y="505" />
+ <di:waypoint xsi:type="dc:Point" x="1682" y="451" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1579" y="463" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c5mxd5_di" bpmnElement="SequenceFlow_1c5mxd5">
+ <di:waypoint xsi:type="dc:Point" x="1481" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1697" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1589" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u8hiu2_di" bpmnElement="SequenceFlow_0u8hiu2">
+ <di:waypoint xsi:type="dc:Point" x="1477" y="514" />
+ <di:waypoint xsi:type="dc:Point" x="1682" y="559" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1580" y="521.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fs7ay9_di" bpmnElement="SequenceFlow_0fs7ay9">
+ <di:waypoint xsi:type="dc:Point" x="1473" y="518" />
+ <di:waypoint xsi:type="dc:Point" x="1652" y="610" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1563" y="549" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00qwx4v_di" bpmnElement="SequenceFlow_00qwx4v">
+ <di:waypoint xsi:type="dc:Point" x="1469" y="522" />
+ <di:waypoint xsi:type="dc:Point" x="1615" y="661" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1542" y="576.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14s8ji9_di" bpmnElement="SequenceFlow_14s8ji9">
+ <di:waypoint xsi:type="dc:Point" x="1466" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1570" y="692" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1518" y="593.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kricor_di" bpmnElement="SequenceFlow_0kricor">
+ <di:waypoint xsi:type="dc:Point" x="1462" y="529" />
+ <di:waypoint xsi:type="dc:Point" x="1524" y="722" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1493" y="610.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11fq8y0_di" bpmnElement="IntermediateThrowEvent_08j8zjs">
+ <dc:Bounds x="1511" y="265" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1486" y="233.41716566866268" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0s02puh_di" bpmnElement="IntermediateThrowEvent_0tj8iiy">
+ <dc:Bounds x="1561" y="294" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1561" y="259.4171656686627" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0jpplot_di" bpmnElement="IntermediateThrowEvent_0oeqjo1">
+ <dc:Bounds x="1609" y="330" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1625" y="306.4171656686627" width="64" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_002ei8c_di" bpmnElement="IntermediateThrowEvent_1939dn7">
+ <dc:Bounds x="1650" y="377" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1689" y="354.4171656686627" width="51" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0mfh44i_di" bpmnElement="IntermediateThrowEvent_1rn3nlo">
+ <dc:Bounds x="1681" y="429" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1724" y="427.4171656686627" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nuhjay_di" bpmnElement="IntermediateThrowEvent_0weaigg">
+ <dc:Bounds x="1697" y="493" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1744" y="492.4171656686626" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_178560e_di" bpmnElement="IntermediateThrowEvent_1q8mns4">
+ <dc:Bounds x="1681" y="546" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1730" y="558.2894211576846" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1iiwg3y_di" bpmnElement="IntermediateThrowEvent_16kgzdv">
+ <dc:Bounds x="1650" y="601" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1698" y="607.2894211576846" width="54" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0q4aaqn_di" bpmnElement="IntermediateThrowEvent_18v3win">
+ <dc:Bounds x="1609" y="656" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1654" y="679.2894211576846" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0x5j21r_di" bpmnElement="IntermediateThrowEvent_0kypyu0">
+ <dc:Bounds x="1562" y="689" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1595" y="727.2894211576846" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_130x96w_di" bpmnElement="IntermediateThrowEvent_024m4nk">
+ <dc:Bounds x="1511" y="721" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1507" y="763.2894211576846" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_178fxkj_di" bpmnElement="SequenceFlow_178fxkj">
+ <di:waypoint xsi:type="dc:Point" x="971" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0d7vlr8_di" bpmnElement="Task_155eyrq">
+ <dc:Bounds x="871" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a0lfh8_di" bpmnElement="SequenceFlow_0a0lfh8">
+ <di:waypoint xsi:type="dc:Point" x="320" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="353" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="1561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r0o5yt_di" bpmnElement="SequenceFlow_0r0o5yt">
+ <di:waypoint xsi:type="dc:Point" x="453" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="490" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="472" y="1561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0slcwxc_di" bpmnElement="SequenceFlow_0slcwxc">
+ <di:waypoint xsi:type="dc:Point" x="590" y="1576" />
+ <di:waypoint xsi:type="dc:Point" x="621" y="1576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="1561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gdinh5_di" bpmnElement="Task_07rej8l">
+ <dc:Bounds x="220" y="1536" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0l1xjdz_di" bpmnElement="Task_16v4gow">
+ <dc:Bounds x="490" y="1536" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1e4qhkx_di" bpmnElement="Task_18twhln">
+ <dc:Bounds x="353" y="1536" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfConfigUpdate.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfConfigUpdate.bpmn
new file mode 100644
index 0000000000..e296aef863
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfConfigUpdate.bpmn
@@ -0,0 +1,1636 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="VnfConfigUpdate" name="VnfConfigUpdate" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y0jt4l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="Task_1rxiqe1" targetRef="ExclusiveGateway_045e1uz" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessRequest" targetRef="ScriptTask_1" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("VnfConfigUpdateSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_07uuj2d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.completionHandlerPrep(execution, 'CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="Task_1tx7e9s" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xt2xvx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.falloutHandlerPrep(execution, 'FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1vxpbd0" sourceRef="Task_1tx7e9s" targetRef="Task_02avn81" />
+ <bpmn2:sequenceFlow id="SequenceFlow_03ayqeh" sourceRef="Task_02avn81" targetRef="Task_0b707rs" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xt2xvx" sourceRef="Task_0b707rs" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="Task_1tx7e9s" name="PreProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1vxpbd0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0b707rs" name="PostProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_03ayqeh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xt2xvx</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_02avn81" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1vxpbd0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03ayqeh</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_18j1ow5" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_0vy2zge" />
+ <bpmn2:scriptTask id="Task_1opcb4j" name="Query A&#38;AI for VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0y0jt4l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_053qjfy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.queryAAIForVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0y0jt4l" sourceRef="ScriptTask_1" targetRef="Task_1opcb4j" />
+ <bpmn2:scriptTask id="Task_1rxiqe1" name="Check If VNF Is In Maintenance in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16mo99z</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09lrk4q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.checkIfVnfInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0usxnlk" sourceRef="Task_0vy2zge" targetRef="ExclusiveGateway_0q323wc" />
+ <bpmn2:scriptTask id="Task_0ap39ka" name="Set VNF inMaintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0baosqi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1eezqx8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k3fx7p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.setVnfInMaintFlagInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1drglpt" name="Unset VNF In Maintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16ff86u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08m0j98</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12mfil6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.setVnfInMaintFlagInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0vy2zge" name="Check If Physical Servers Are Locked in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_179tyul</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0usxnlk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.checkIfPserversInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0q323wc" name="Error on PServers Check?" default="SequenceFlow_16mo99z">
+ <bpmn2:incoming>SequenceFlow_0usxnlk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16mo99z</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_06ev8or</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16mo99z" name="no" sourceRef="ExclusiveGateway_0q323wc" targetRef="Task_1rxiqe1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045e1uz" name="Error On inMaintenance Check?" default="SequenceFlow_0baosqi">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0baosqi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1cdfjed</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0baosqi" name="no" sourceRef="ExclusiveGateway_045e1uz" targetRef="Task_0ap39ka" />
+ <bpmn2:callActivity id="Task_0q5cdit" name="Rainy Day Handler" calledElement="RainyDayHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="nfRole" target="vnfType" />
+ <camunda:in source="currentActivity" target="currentActivity" />
+ <camunda:in source="workStep" target="workStep" />
+ <camunda:in source="failedActivity" target="failedActivity" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="errorText" target="errorText" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="handlingCode" target="disposition" />
+ <camunda:in source="requestorId" target="requestorId" />
+ <camunda:out source="taskId" target="taskId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0nob5cp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0v0u7mf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0v0u7mf" sourceRef="Task_0q5cdit" targetRef="ExclusiveGateway_0xlxgl0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vpd06n" name="Abort" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_1tg549h">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Abort"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qr8msw" name="Rollback" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_0zbogrm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Rollback"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ud5uwa" name="Eror on inMaintenance Set?" default="SequenceFlow_06ajc11">
+ <bpmn2:incoming>SequenceFlow_0k3fx7p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17g62fl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_06ajc11</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3fx7p" sourceRef="Task_0ap39ka" targetRef="ExclusiveGateway_0ud5uwa" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gn5lab" name="Error on Health PostCheck?" default="SequenceFlow_08m0j98">
+ <bpmn2:incoming>SequenceFlow_1c79909</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1urpp94</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_08m0j98</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0l2z6wc" name="Erorr on inMaintenance Unset?" default="SequenceFlow_0u6ho2p">
+ <bpmn2:incoming>SequenceFlow_12mfil6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0u6ho2p</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0k3zxpd</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_12mfil6" sourceRef="Task_1drglpt" targetRef="ExclusiveGateway_0l2z6wc" />
+ <bpmn2:scriptTask id="Task_1tg549h" name="Abort Processing" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vpd06n</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1c022sy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_05omwbu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18lemf9</bpmn2:incoming>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.abortProcessing(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0xlxgl0" name="Check Disposition">
+ <bpmn2:incoming>SequenceFlow_0v0u7mf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qr8msw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05gpym3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0vpd06n</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0rlmex7</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y82zzx" name="Next Step?&#10;&#10;" default="SequenceFlow_1c022sy">
+ <bpmn2:incoming>SequenceFlow_05gpym3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19myx3o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c022sy</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ueoglv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15fqlwe</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0yuj0l5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1abb030</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ls3ej5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ar6ikk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0t53vux</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11ck4qe</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16d2ln4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1quapjx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_101n488</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_05gpym3" name="Skip" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Skip" ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c022sy" sourceRef="ExclusiveGateway_0y82zzx" targetRef="Task_1tg549h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06ev8or" name="yes" sourceRef="ExclusiveGateway_0q323wc" targetRef="IntermediateThrowEvent_0zmqbae">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0zmqbae" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_06ev8or</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nob5cp" sourceRef="IntermediateThrowEvent_0z0t7rn" targetRef="Task_0q5cdit" />
+ <bpmn2:sequenceFlow id="SequenceFlow_076leae" sourceRef="Task_0e313zv" targetRef="ExclusiveGateway_1rglbmr" />
+ <bpmn2:scriptTask id="Task_0e313zv" name="Check If VF Closed Loop Disabled in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0zzwdwf</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_06ajc11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_076leae</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.checkIfClosedLoopDisabledInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1rglbmr" name="Error on isClosedLoopDisabled Check?" default="SequenceFlow_0du9273">
+ <bpmn2:incoming>SequenceFlow_076leae</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0du9273</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0zh8r6j</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0du9273" name="no&#10;&#10;" sourceRef="ExclusiveGateway_1rglbmr" targetRef="Task_0n1d5f2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0z0t7rn" name="To Rainy Day Handling" camunda:asyncBefore="true">
+ <bpmn2:outgoing>SequenceFlow_0nob5cp</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1qkzlba" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1cdfjed</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cdfjed" name="yes" sourceRef="ExclusiveGateway_045e1uz" targetRef="IntermediateThrowEvent_1qkzlba">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0rnlvmz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_17g62fl</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_17g62fl" name="yes" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="IntermediateThrowEvent_0rnlvmz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v69raz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0zh8r6j</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zh8r6j" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_1rglbmr" targetRef="IntermediateThrowEvent_0v69raz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_15hlkuq" name="To inMaintenanceCheck">
+ <bpmn2:outgoing>SequenceFlow_09lrk4q</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenanceCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_09lrk4q" sourceRef="IntermediateThrowEvent_15hlkuq" targetRef="Task_1rxiqe1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1eezqx8" sourceRef="IntermediateThrowEvent_1lrkrsn" targetRef="Task_0ap39ka" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1lrkrsn" name="To InMaintenance Set">
+ <bpmn2:outgoing>SequenceFlow_1eezqx8</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To InMaintenance Set" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1wdxgjm" name="To check if Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_0zzwdwf</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To check if Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zzwdwf" sourceRef="IntermediateThrowEvent_1wdxgjm" targetRef="Task_0e313zv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06ajc11" name="no" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="Task_0e313zv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_179z9vl" sourceRef="Task_0n1d5f2" targetRef="ExclusiveGateway_148eo7w" />
+ <bpmn2:scriptTask id="Task_0n1d5f2" name="Set VF Is Closed Loop Disabled Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0du9273</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_032tm9y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_179z9vl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.setClosedLoopDisabledInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_032tm9y" sourceRef="IntermediateThrowEvent_1552q1o" targetRef="Task_0n1d5f2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1552q1o" name="To set Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_032tm9y</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To set Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_148eo7w" name="Error on Set IsClosedLoopDisabled Flag in A&#38;AI?" default="SequenceFlow_1cjiv6i">
+ <bpmn2:incoming>SequenceFlow_179z9vl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cjiv6i</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1q3oxtf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cjiv6i" name="no&#10;&#10;" sourceRef="ExclusiveGateway_148eo7w" targetRef="Task_1hdg951" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16r1jxm" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1q3oxtf</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q3oxtf" name="yes" sourceRef="ExclusiveGateway_148eo7w" targetRef="IntermediateThrowEvent_16r1jxm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_02hirbh" name="To ConfigModify">
+ <bpmn2:outgoing>SequenceFlow_1wqinjh</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To ConfigModify" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1urpp94" name="yes" sourceRef="ExclusiveGateway_1gn5lab" targetRef="IntermediateThrowEvent_0vf0a28">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0vf0a28" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1urpp94</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0pk24h2" name="To Health PreCheck">
+ <bpmn2:outgoing>SequenceFlow_1colra4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_18j1ow5" name="Error on Unset Closed Loop Disabled?" default="SequenceFlow_3">
+ <bpmn2:incoming>SequenceFlow_1tzax6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w8mkkn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u6ho2p" name="no" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="Task_0y1h8go" />
+ <bpmn2:scriptTask id="Task_0y1h8go" name="Unset VF Is Closed Loop DisabledFlag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0u6ho2p</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09xxorv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1tzax6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.setClosedLoopDisabledInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tzax6l" sourceRef="Task_0y1h8go" targetRef="ExclusiveGateway_18j1ow5" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0pmevcz" name="To unset inMaintenance">
+ <bpmn2:outgoing>SequenceFlow_16ff86u</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To unset inMaintenance" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16ff86u" sourceRef="IntermediateThrowEvent_0pmevcz" targetRef="Task_1drglpt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3zxpd" name="yes" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="IntermediateThrowEvent_1awckg7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1awckg7" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0k3zxpd</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1b3smly" name="To unset Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_09xxorv</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To unset Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xxorv" sourceRef="IntermediateThrowEvent_1b3smly" targetRef="Task_0y1h8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w8mkkn" name="yes" sourceRef="ExclusiveGateway_18j1ow5" targetRef="IntermediateThrowEvent_1cw8gsw">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1cw8gsw" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0w8mkkn</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0x846wp" name="To Completion Handler Prep">
+ <bpmn2:outgoing>SequenceFlow_07uuj2d</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_07uuj2d" sourceRef="IntermediateThrowEvent_0x846wp" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ueoglv" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0rz6jh4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkIfPserversInMaintInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkIfVnfInMaintInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_15fqlwe" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1wip9vc">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkIfVnfInMaintInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "setVnfInMaintFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0yuj0l5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1hki8xj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "setVnfInMaintFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1abb030" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1gfnt9b">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "setClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ls3ej5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1gzhs1a">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "setClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "HealthCheck0")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ar6ikk" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1p9i2bi">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "ConfigModify") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "HealthCheck1")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0t53vux" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1cp0hkt">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "HealthCheck1") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_11ck4qe" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_184w0i8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "unsetClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_16d2ln4" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1u9f9kp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "unsetClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "completionHandlerPrep")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0rz6jh4" name="To inMaintenanceCheck">
+ <bpmn2:incoming>SequenceFlow_0ueoglv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenanceCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1wip9vc" name="To InMaintenance Set">
+ <bpmn2:incoming>SequenceFlow_15fqlwe</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To InMaintenance Set" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1hki8xj" name="To check if Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_0yuj0l5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To check if Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gfnt9b" name="To set Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_1abb030</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To set Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gzhs1a" name="To Health PreCheck">
+ <bpmn2:incoming>SequenceFlow_0ls3ej5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PreCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0385ons" name="To ConfigModify">
+ <bpmn2:incoming>SequenceFlow_1quapjx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To ConfigModify" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1quapjx" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0385ons">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "HealthCheck0") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "ConfigModify")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1p9i2bi" name="To Health PostCheck">
+ <bpmn2:incoming>SequenceFlow_1ar6ikk</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1cp0hkt" name="To unset inMaintenance">
+ <bpmn2:incoming>SequenceFlow_0t53vux</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To unset inMaintenance" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_184w0i8" name="To unset Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_11ck4qe</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To unset Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1u9f9kp" name="To Completion Handler Prep">
+ <bpmn2:incoming>SequenceFlow_16d2ln4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_18wrvcy" name="To check if Physical Servers Are Locked">
+ <bpmn2:outgoing>SequenceFlow_179tyul</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To check if Physical Servers Are Locked" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_179tyul" sourceRef="IntermediateThrowEvent_18wrvcy" targetRef="Task_0vy2zge" />
+ <bpmn2:sequenceFlow id="SequenceFlow_101n488" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_17k1fmk">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkIfPserversInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_17k1fmk" name="To check if Physical Servers Are Locked">
+ <bpmn2:incoming>SequenceFlow_101n488</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To check if Physical Servers Are Locked" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1colra4" sourceRef="IntermediateThrowEvent_0pk24h2" targetRef="Task_1hdg951" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0fhmhsk" name="To Health PostCheck">
+ <bpmn2:outgoing>SequenceFlow_16igl7b</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Health PostCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16igl7b" sourceRef="IntermediateThrowEvent_0fhmhsk" targetRef="Task_1ca5ctq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c79909" sourceRef="Task_1ca5ctq" targetRef="ExclusiveGateway_1gn5lab" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_16eos6z" name="Error on Health PreCheck?" default="SequenceFlow_188a7lk">
+ <bpmn2:incoming>SequenceFlow_0wfzjs1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_188a7lk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12konw1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nettij" name="Error on ConfigModify?" default="SequenceFlow_0q1skau">
+ <bpmn2:incoming>SequenceFlow_0lpreg4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q1skau</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1s3pbww</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0wfzjs1" sourceRef="Task_1hdg951" targetRef="ExclusiveGateway_16eos6z" />
+ <bpmn2:sequenceFlow id="SequenceFlow_188a7lk" name="no" sourceRef="ExclusiveGateway_16eos6z" targetRef="Task_1fj63ov" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0lpreg4" sourceRef="Task_1fj63ov" targetRef="ExclusiveGateway_1nettij" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0q1skau" name="no" sourceRef="ExclusiveGateway_1nettij" targetRef="Task_1ca5ctq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08m0j98" name="no" sourceRef="ExclusiveGateway_1gn5lab" targetRef="Task_1drglpt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1wqinjh" sourceRef="IntermediateThrowEvent_02hirbh" targetRef="Task_1fj63ov" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0s8cdpt" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_12konw1</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12konw1" name="yes" sourceRef="ExclusiveGateway_16eos6z" targetRef="IntermediateThrowEvent_0s8cdpt">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0e2ibog" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1s3pbww</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s3pbww" name="yes" sourceRef="ExclusiveGateway_1nettij" targetRef="IntermediateThrowEvent_0e2ibog">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_1hdg951" name="Call APP-C Health PreCheck" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1cjiv6i</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1colra4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0wfzjs1</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1ca5ctq" name="Call APP-C Health PostCheck" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionHealthCheck" target="action" />
+ <camunda:in source="healthCheckIndex1" target="healthCheckIndex" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfHostIpAddress" target="vnfHostIpAddress" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16igl7b</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0q1skau</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c79909</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1fj63ov" name="Call APP-C ConfigModify" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionConfigModify" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_188a7lk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1wqinjh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lpreg4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0rlmex7" name="Retry" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_0em349i">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Retry"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="Task_0em349i" name="Increment Retry Count" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0rlmex7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xwgemy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfConfigUpdate()
+uvfm.incrementRetryCount(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0yu25qy" name="Retries Left?" default="SequenceFlow_05omwbu">
+ <bpmn2:incoming>SequenceFlow_1nm4wr1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19myx3o</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05omwbu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19myx3o" name="yes" sourceRef="ExclusiveGateway_0yu25qy" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[String retryVariableName = execution.getVariable('retryCountVariableName')
+
+execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_05omwbu" name="no" sourceRef="ExclusiveGateway_0yu25qy" targetRef="Task_1tg549h" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0u8jlsq" name="RetryTimer">
+ <bpmn2:incoming>SequenceFlow_1xwgemy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nm4wr1</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT1M</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xwgemy" sourceRef="Task_0em349i" targetRef="IntermediateThrowEvent_0u8jlsq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1nm4wr1" sourceRef="IntermediateThrowEvent_0u8jlsq" targetRef="ExclusiveGateway_0yu25qy" />
+ <bpmn2:callActivity id="Task_0zbogrm" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qr8msw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18lemf9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_18lemf9" sourceRef="Task_0zbogrm" targetRef="Task_1tg549h" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VnfConfigUpdate">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="97" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="113" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="574" y="734" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="572" y="775" width="39" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="133" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="209" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="309" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="373" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="473" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="513" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="493" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="420" y="712" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="520" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="554" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="554" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="574" y="752" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="569" y="752" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="131" y="712" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="274" y="712" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="231" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="253" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="253" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="274" y="752" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="268" y="752" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="109" y="1075" width="1139" height="244" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="173" y="1169" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="152" y="1210" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="795" y="1147" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="209" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="265" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="237" y="1172" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="895" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="911" y="1187" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1119" y="1169" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1137" y="1210" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="1230" y="1170" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1248" y="1211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1333" y="1169" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1351" y="1210" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="1266" y="1188" />
+ <di:waypoint xsi:type="dc:Point" x="1333" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1300" y="1172.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="963" y="1147" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="374" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="420" y="752" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="752" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="1063" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="1119" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="956" y="1247" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="1227" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="1293" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="1293" y="662" />
+ <di:waypoint xsi:type="dc:Point" x="97" y="662" />
+ <di:waypoint xsi:type="dc:Point" x="97" y="752" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="752" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1251" y="459" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_053qjfy_di" bpmnElement="SequenceFlow_053qjfy">
+ <di:waypoint xsi:type="dc:Point" x="642" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08xzuox_di" bpmnElement="Task_1opcb4j">
+ <dc:Bounds x="542" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y0jt4l_di" bpmnElement="SequenceFlow_0y0jt4l">
+ <di:waypoint xsi:type="dc:Point" x="473" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19pf9z8_di" bpmnElement="Task_1rxiqe1">
+ <dc:Bounds x="373" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0usxnlk_di" bpmnElement="SequenceFlow_0usxnlk">
+ <di:waypoint xsi:type="dc:Point" x="231" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="279" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="255" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wa4zya_di" bpmnElement="Task_0ap39ka">
+ <dc:Bounds x="608" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sgm9bu_di" bpmnElement="Task_1drglpt">
+ <dc:Bounds x="826" y="444" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16jtt5t_di" bpmnElement="Task_0vy2zge">
+ <dc:Bounds x="131" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0q323wc_di" bpmnElement="ExclusiveGateway_0q323wc" isMarkerVisible="true">
+ <dc:Bounds x="279" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="260" y="173" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16mo99z_di" bpmnElement="SequenceFlow_16mo99z">
+ <di:waypoint xsi:type="dc:Point" x="329" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="213" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045e1uz_di" bpmnElement="ExclusiveGateway_045e1uz" isMarkerVisible="true">
+ <dc:Bounds x="513" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="163" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0baosqi_di" bpmnElement="SequenceFlow_0baosqi">
+ <di:waypoint xsi:type="dc:Point" x="563" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="579" y="214" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1k5n5d1_di" bpmnElement="Task_0q5cdit">
+ <dc:Bounds x="1491" y="390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v0u7mf_di" bpmnElement="SequenceFlow_0v0u7mf">
+ <di:waypoint xsi:type="dc:Point" x="1591" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="1673" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1632" y="415" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vpd06n_di" bpmnElement="SequenceFlow_0vpd06n">
+ <di:waypoint xsi:type="dc:Point" x="1698" y="405" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="312" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1704" y="351" width="27" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qr8msw_di" bpmnElement="SequenceFlow_1qr8msw">
+ <di:waypoint xsi:type="dc:Point" x="1698" y="455" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1677" y="473" width="42" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ud5uwa_di" bpmnElement="ExclusiveGateway_0ud5uwa" isMarkerVisible="true">
+ <dc:Bounds x="735" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="731" y="166" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3fx7p_di" bpmnElement="SequenceFlow_0k3fx7p">
+ <di:waypoint xsi:type="dc:Point" x="708" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="735" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gn5lab_di" bpmnElement="ExclusiveGateway_1gn5lab" isMarkerVisible="true">
+ <dc:Bounds x="735" y="459" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="721" y="419" width="77" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0l2z6wc_di" bpmnElement="ExclusiveGateway_0l2z6wc" isMarkerVisible="true">
+ <dc:Bounds x="963" y="459" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951" y="412" width="73" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12mfil6_di" bpmnElement="SequenceFlow_12mfil6">
+ <di:waypoint xsi:type="dc:Point" x="926" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="469" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lb0lk5_di" bpmnElement="Task_1tg549h">
+ <dc:Bounds x="1648" y="232" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gmvi7n_di" bpmnElement="ExclusiveGateway_0xlxgl0" isMarkerVisible="true">
+ <dc:Bounds x="1673" y="405" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1654" y="387" width="87" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y82zzx_di" bpmnElement="ExclusiveGateway_0y82zzx" isMarkerVisible="true">
+ <dc:Bounds x="1967" y="405" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1927" y="397" width="54" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05gpym3_di" bpmnElement="SequenceFlow_05gpym3">
+ <di:waypoint xsi:type="dc:Point" x="1723" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="1967" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1813" y="436" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c022sy_di" bpmnElement="SequenceFlow_1c022sy">
+ <di:waypoint xsi:type="dc:Point" x="1992" y="405" />
+ <di:waypoint xsi:type="dc:Point" x="1992" y="272" />
+ <di:waypoint xsi:type="dc:Point" x="1748" y="272" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2007" y="338.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ev8or_di" bpmnElement="SequenceFlow_06ev8or">
+ <di:waypoint xsi:type="dc:Point" x="304" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="288" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="288" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="314" y="273" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0o6fb4f_di" bpmnElement="IntermediateThrowEvent_0zmqbae">
+ <dc:Bounds x="286" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="343.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nob5cp_di" bpmnElement="SequenceFlow_0nob5cp">
+ <di:waypoint xsi:type="dc:Point" x="1405" y="430" />
+ <di:waypoint xsi:type="dc:Point" x="1491" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1448" y="415" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_076leae_di" bpmnElement="SequenceFlow_076leae">
+ <di:waypoint xsi:type="dc:Point" x="926" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cbpm7l_di" bpmnElement="Task_0e313zv">
+ <dc:Bounds x="826" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1rglbmr_di" bpmnElement="ExclusiveGateway_1rglbmr" isMarkerVisible="true">
+ <dc:Bounds x="955.192" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="164" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0du9273_di" bpmnElement="SequenceFlow_0du9273">
+ <di:waypoint xsi:type="dc:Point" x="1005" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1020" y="212" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1p06jf5_di" bpmnElement="IntermediateThrowEvent_0z0t7rn">
+ <dc:Bounds x="1369" y="412" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1354" y="458" width="66" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0xwlxk9_di" bpmnElement="IntermediateThrowEvent_1qkzlba">
+ <dc:Bounds x="520" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="344" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cdfjed_di" bpmnElement="SequenceFlow_1cdfjed">
+ <di:waypoint xsi:type="dc:Point" x="538" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="544" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_113xxsl_di" bpmnElement="IntermediateThrowEvent_0rnlvmz">
+ <dc:Bounds x="742" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="344" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17g62fl_di" bpmnElement="SequenceFlow_17g62fl">
+ <di:waypoint xsi:type="dc:Point" x="760" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0iyegh1_di" bpmnElement="IntermediateThrowEvent_0v69raz">
+ <dc:Bounds x="962" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="343.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zh8r6j_di" bpmnElement="SequenceFlow_0zh8r6j">
+ <di:waypoint xsi:type="dc:Point" x="980" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="285" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_07pur50_di" bpmnElement="IntermediateThrowEvent_15hlkuq">
+ <dc:Bounds x="405" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="381" y="344" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09lrk4q_di" bpmnElement="SequenceFlow_09lrk4q">
+ <di:waypoint xsi:type="dc:Point" x="423" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="438" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eezqx8_di" bpmnElement="SequenceFlow_1eezqx8">
+ <di:waypoint xsi:type="dc:Point" x="658" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="673" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1pog9t5_di" bpmnElement="IntermediateThrowEvent_1lrkrsn">
+ <dc:Bounds x="640" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="614" y="343.609" width="88" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1rtf0em_di" bpmnElement="IntermediateThrowEvent_1wdxgjm">
+ <dc:Bounds x="858" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="844" y="344" width="64" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zzwdwf_di" bpmnElement="SequenceFlow_0zzwdwf">
+ <di:waypoint xsi:type="dc:Point" x="876" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ajc11_di" bpmnElement="SequenceFlow_06ajc11">
+ <di:waypoint xsi:type="dc:Point" x="785" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="800" y="212" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_179z9vl_di" bpmnElement="SequenceFlow_179z9vl">
+ <di:waypoint xsi:type="dc:Point" x="1146" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1165" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1iio503_di" bpmnElement="Task_0n1d5f2">
+ <dc:Bounds x="1046" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_032tm9y_di" bpmnElement="SequenceFlow_032tm9y">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jhmy9d_di" bpmnElement="IntermediateThrowEvent_1552q1o">
+ <dc:Bounds x="1078" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="344" width="70" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_148eo7w_di" bpmnElement="ExclusiveGateway_148eo7w" isMarkerVisible="true">
+ <dc:Bounds x="1184.192" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1167" y="149" width="83" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cjiv6i_di" bpmnElement="SequenceFlow_1cjiv6i">
+ <di:waypoint xsi:type="dc:Point" x="1234" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1285" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1285" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="105" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="105" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1249" y="211" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1qtnv6e_di" bpmnElement="IntermediateThrowEvent_16r1jxm">
+ <dc:Bounds x="1191" y="299" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1174" y="334.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q3oxtf_di" bpmnElement="SequenceFlow_1q3oxtf">
+ <di:waypoint xsi:type="dc:Point" x="1209" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1215" y="270.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1ogs7t2_di" bpmnElement="IntermediateThrowEvent_02hirbh">
+ <dc:Bounds x="405" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="383" y="613" width="79" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1urpp94_di" bpmnElement="SequenceFlow_1urpp94">
+ <di:waypoint xsi:type="dc:Point" x="760" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="577" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="528.3097560975609" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1vi3wf9_di" bpmnElement="IntermediateThrowEvent_0vf0a28">
+ <dc:Bounds x="742" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="726" y="613" width="68" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1bsxf5o_di" bpmnElement="IntermediateThrowEvent_0pk24h2">
+ <dc:Bounds x="163" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="156" y="613" width="50" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_18j1ow5_di" bpmnElement="ExclusiveGateway_18j1ow5" isMarkerVisible="true">
+ <dc:Bounds x="1177" y="459" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1172" y="407" width="75" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u6ho2p_di" bpmnElement="SequenceFlow_0u6ho2p">
+ <di:waypoint xsi:type="dc:Point" x="1013" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="1043" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1022" y="459" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08r89q9_di" bpmnElement="Task_0y1h8go">
+ <dc:Bounds x="1043" y="444" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tzax6l_di" bpmnElement="SequenceFlow_1tzax6l">
+ <di:waypoint xsi:type="dc:Point" x="1143" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="1177" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1333" y="455" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_06j33fe_di" bpmnElement="IntermediateThrowEvent_0pmevcz">
+ <dc:Bounds x="858" y="570" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="606" width="70" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ff86u_di" bpmnElement="SequenceFlow_16ff86u">
+ <di:waypoint xsi:type="dc:Point" x="876" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="537" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3zxpd_di" bpmnElement="SequenceFlow_0k3zxpd">
+ <di:waypoint xsi:type="dc:Point" x="988" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="988" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="540" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_105mp22_di" bpmnElement="IntermediateThrowEvent_1awckg7">
+ <dc:Bounds x="970" y="570" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="954" y="606" width="68" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0kglv4e_di" bpmnElement="IntermediateThrowEvent_1b3smly">
+ <dc:Bounds x="1075" y="570" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1052" y="606" width="81" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xxorv_di" bpmnElement="SequenceFlow_09xxorv">
+ <di:waypoint xsi:type="dc:Point" x="1093" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="1093" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1108" y="537" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w8mkkn_di" bpmnElement="SequenceFlow_0w8mkkn">
+ <di:waypoint xsi:type="dc:Point" x="1202" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="1202" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1208" y="540" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0jwgx1d_di" bpmnElement="IntermediateThrowEvent_1cw8gsw">
+ <dc:Bounds x="1184" y="570" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1168" y="606" width="68" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0zw87jy_di" bpmnElement="IntermediateThrowEvent_0x846wp">
+ <dc:Bounds x="163" y="847" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="144" y="883" width="73" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_07uuj2d_di" bpmnElement="SequenceFlow_07uuj2d">
+ <di:waypoint xsi:type="dc:Point" x="181" y="847" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="821" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="821" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="792" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="197" y="821" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ueoglv_di" bpmnElement="SequenceFlow_0ueoglv">
+ <di:waypoint xsi:type="dc:Point" x="1999" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="2079" y="197" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2039" y="290" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15fqlwe_di" bpmnElement="SequenceFlow_15fqlwe">
+ <di:waypoint xsi:type="dc:Point" x="2002" y="415" />
+ <di:waypoint xsi:type="dc:Point" x="2127" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2066" y="309" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yuj0l5_di" bpmnElement="SequenceFlow_0yuj0l5">
+ <di:waypoint xsi:type="dc:Point" x="2006" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="2172" y="283" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2089" y="336" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1abb030_di" bpmnElement="SequenceFlow_1abb030">
+ <di:waypoint xsi:type="dc:Point" x="2010" y="423" />
+ <di:waypoint xsi:type="dc:Point" x="2203" y="349" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2107" y="371" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ls3ej5_di" bpmnElement="SequenceFlow_0ls3ej5">
+ <di:waypoint xsi:type="dc:Point" x="2016" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="2221" y="429" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2119" y="414" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ar6ikk_di" bpmnElement="SequenceFlow_1ar6ikk">
+ <di:waypoint xsi:type="dc:Point" x="2006" y="441" />
+ <di:waypoint xsi:type="dc:Point" x="2172" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2089" y="488" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t53vux_di" bpmnElement="SequenceFlow_0t53vux">
+ <di:waypoint xsi:type="dc:Point" x="2003" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="2128" y="605" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2066" y="510" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11ck4qe_di" bpmnElement="SequenceFlow_11ck4qe">
+ <di:waypoint xsi:type="dc:Point" x="1999" y="448" />
+ <di:waypoint xsi:type="dc:Point" x="2078" y="644" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2039" y="531" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16d2ln4_di" bpmnElement="SequenceFlow_16d2ln4">
+ <di:waypoint xsi:type="dc:Point" x="1996" y="451" />
+ <di:waypoint xsi:type="dc:Point" x="2033" y="670" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2015" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_17syve1_di" bpmnElement="IntermediateThrowEvent_0rz6jh4">
+ <dc:Bounds x="2067" y="163" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2073" y="123" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nv8aic_di" bpmnElement="IntermediateThrowEvent_1wip9vc">
+ <dc:Bounds x="2120" y="200" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2169" y="196" width="89" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1g4pmwc_di" bpmnElement="IntermediateThrowEvent_1hki8xj">
+ <dc:Bounds x="2168" y="254" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2208" y="223" width="64" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ypnogn_di" bpmnElement="IntermediateThrowEvent_1gfnt9b">
+ <dc:Bounds x="2202" y="326" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2248" y="312" width="71" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1i9ttzs_di" bpmnElement="IntermediateThrowEvent_1gzhs1a">
+ <dc:Bounds x="2221" y="412" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2273" y="409" width="51" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0840e02_di" bpmnElement="IntermediateThrowEvent_0385ons">
+ <dc:Bounds x="2202" y="486" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2250" y="484" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1quapjx_di" bpmnElement="SequenceFlow_1quapjx">
+ <di:waypoint xsi:type="dc:Point" x="2011" y="436" />
+ <di:waypoint xsi:type="dc:Point" x="2204" y="498" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2108" y="452" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1xq4kx8_di" bpmnElement="IntermediateThrowEvent_1p9i2bi">
+ <dc:Bounds x="2168" y="558" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2227" y="559" width="54" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1vcx5cz_di" bpmnElement="IntermediateThrowEvent_1cp0hkt">
+ <dc:Bounds x="2120" y="601" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2154" y="625" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1y8fmlw_di" bpmnElement="IntermediateThrowEvent_184w0i8">
+ <dc:Bounds x="2067" y="642" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2107" y="679" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_024zi9r_di" bpmnElement="IntermediateThrowEvent_1u9f9kp">
+ <dc:Bounds x="2016" y="670" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2021" y="711" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_08x53cb_di" bpmnElement="IntermediateThrowEvent_18wrvcy">
+ <dc:Bounds x="158" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="134" y="343.09862671660426" width="83" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_179tyul_di" bpmnElement="SequenceFlow_179tyul">
+ <di:waypoint xsi:type="dc:Point" x="180" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="181" y="278" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_101n488_di" bpmnElement="SequenceFlow_101n488">
+ <di:waypoint xsi:type="dc:Point" x="1996" y="409" />
+ <di:waypoint xsi:type="dc:Point" x="2033" y="177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2015" y="278" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1fnxvhb_di" bpmnElement="IntermediateThrowEvent_17k1fmk">
+ <dc:Bounds x="2016" y="141" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1991" y="91" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1colra4_di" bpmnElement="SequenceFlow_1colra4">
+ <di:waypoint xsi:type="dc:Point" x="181" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="196" y="550.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_174wgan_di" bpmnElement="IntermediateThrowEvent_0fhmhsk">
+ <dc:Bounds x="640" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="631" y="613" width="53" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16igl7b_di" bpmnElement="SequenceFlow_16igl7b">
+ <di:waypoint xsi:type="dc:Point" x="658" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="673" y="550.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c79909_di" bpmnElement="SequenceFlow_1c79909">
+ <di:waypoint xsi:type="dc:Point" x="708" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="735" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="469" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_16eos6z_di" bpmnElement="ExclusiveGateway_16eos6z" isMarkerVisible="true">
+ <dc:Bounds x="279" y="459" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="265" y="422" width="77" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nettij_di" bpmnElement="ExclusiveGateway_1nettij" isMarkerVisible="true">
+ <dc:Bounds x="513" y="459" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="417" width="71" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0wfzjs1_di" bpmnElement="SequenceFlow_0wfzjs1">
+ <di:waypoint xsi:type="dc:Point" x="231" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="279" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="255" y="469" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_188a7lk_di" bpmnElement="SequenceFlow_188a7lk">
+ <di:waypoint xsi:type="dc:Point" x="329" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="459" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lpreg4_di" bpmnElement="SequenceFlow_0lpreg4">
+ <di:waypoint xsi:type="dc:Point" x="473" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="513" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="493" y="469" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q1skau_di" bpmnElement="SequenceFlow_0q1skau">
+ <di:waypoint xsi:type="dc:Point" x="563" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="580" y="459" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08m0j98_di" bpmnElement="SequenceFlow_08m0j98">
+ <di:waypoint xsi:type="dc:Point" x="785" y="484" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="799" y="459" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wqinjh_di" bpmnElement="SequenceFlow_1wqinjh">
+ <di:waypoint xsi:type="dc:Point" x="423" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="438" y="550.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0jgks05_di" bpmnElement="IntermediateThrowEvent_0s8cdpt">
+ <dc:Bounds x="286" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="613" width="69" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12konw1_di" bpmnElement="SequenceFlow_12konw1">
+ <di:waypoint xsi:type="dc:Point" x="304" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="577" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="310" y="532.5983606557377" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1jys13n_di" bpmnElement="IntermediateThrowEvent_0e2ibog">
+ <dc:Bounds x="520" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="613" width="69" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s3pbww_di" bpmnElement="SequenceFlow_1s3pbww">
+ <di:waypoint xsi:type="dc:Point" x="538" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="577" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="544" y="533" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0iywyn3_di" bpmnElement="Task_1hdg951">
+ <dc:Bounds x="131" y="444" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0pzya8j_di" bpmnElement="Task_1ca5ctq">
+ <dc:Bounds x="608" y="444" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ck1c9r_di" bpmnElement="Task_1fj63ov">
+ <dc:Bounds x="373" y="444" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rlmex7_di" bpmnElement="SequenceFlow_0rlmex7">
+ <di:waypoint xsi:type="dc:Point" x="1712" y="441" />
+ <di:waypoint xsi:type="dc:Point" x="1823" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1778" y="468.1344841912912" width="27" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0dqs9kj_di" bpmnElement="Task_0em349i">
+ <dc:Bounds x="1823" y="489" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0yu25qy_di" bpmnElement="ExclusiveGateway_0yu25qy" isMarkerVisible="true">
+ <dc:Bounds x="1909" y="626" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1903" y="676" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19myx3o_di" bpmnElement="SequenceFlow_19myx3o">
+ <di:waypoint xsi:type="dc:Point" x="1959" y="651" />
+ <di:waypoint xsi:type="dc:Point" x="1968" y="651" />
+ <di:waypoint xsi:type="dc:Point" x="1968" y="431" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1975" y="589.1802690904609" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05omwbu_di" bpmnElement="SequenceFlow_05omwbu">
+ <di:waypoint xsi:type="dc:Point" x="1934" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="1934" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="1698" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1938" y="581.649978474545" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0e4c19r_di" bpmnElement="IntermediateThrowEvent_0u8jlsq">
+ <dc:Bounds x="1855" y="601" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1790" y="613" width="55" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xwgemy_di" bpmnElement="SequenceFlow_1xwgemy">
+ <di:waypoint xsi:type="dc:Point" x="1873" y="569" />
+ <di:waypoint xsi:type="dc:Point" x="1873" y="601" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1888" y="575" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nm4wr1_di" bpmnElement="SequenceFlow_1nm4wr1">
+ <di:waypoint xsi:type="dc:Point" x="1873" y="637" />
+ <di:waypoint xsi:type="dc:Point" x="1873" y="651" />
+ <di:waypoint xsi:type="dc:Point" x="1909" y="651" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1888" y="644" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0b2drei_di" bpmnElement="Task_0zbogrm">
+ <dc:Bounds x="1648" y="524" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18lemf9_di" bpmnElement="SequenceFlow_18lemf9">
+ <di:waypoint xsi:type="dc:Point" x="1648" y="564" />
+ <di:waypoint xsi:type="dc:Point" x="1617" y="564" />
+ <di:waypoint xsi:type="dc:Point" x="1617" y="272" />
+ <di:waypoint xsi:type="dc:Point" x="1648" y="272" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1632" y="418" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vxpbd0_di" bpmnElement="SequenceFlow_1vxpbd0">
+ <di:waypoint xsi:type="dc:Point" x="365" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="431" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="398" y="1172" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03ayqeh_di" bpmnElement="SequenceFlow_03ayqeh">
+ <di:waypoint xsi:type="dc:Point" x="531" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="1172" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xt2xvx_di" bpmnElement="SequenceFlow_0xt2xvx">
+ <di:waypoint xsi:type="dc:Point" x="714" y="1187" />
+ <di:waypoint xsi:type="dc:Point" x="795" y="1187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="755" y="1172" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1w171si_di" bpmnElement="Task_1tx7e9s">
+ <dc:Bounds x="265" y="1147" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0c9vk4v_di" bpmnElement="Task_0b707rs">
+ <dc:Bounds x="614" y="1147" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_02c6e2e_di" bpmnElement="Task_02avn81">
+ <dc:Bounds x="431" y="1147" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn
new file mode 100644
index 0000000000..3c42320302
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn
@@ -0,0 +1,2302 @@
+<?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="_F0omAMXGEeW834CKd-K10Q" 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="VnfInPlaceUpdate" name="VnfInPlaceUpdate" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y0jt4l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="Task_1rxiqe1" targetRef="ExclusiveGateway_045e1uz" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessRequest" targetRef="ScriptTask_1" />
+ <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in source="CompletionHandlerRequest" target="CompleteMsoProcessRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("VnfInPlaceUpdateSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_07uuj2d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.completionHandlerPrep(execution, 'CompletionHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="Task_0ilgwhw" />
+ <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ib8gb8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.falloutHandlerPrep(execution, 'FalloutHandlerRequest')
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2" />
+ <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="FalloutHandlerRequest" target="FalloutHandlerRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qnzi6i" sourceRef="Task_13sybx8" targetRef="Task_1mt62gu" />
+ <bpmn2:callActivity id="Task_13sybx8" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0hvg70o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qnzi6i</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0hvg70o" sourceRef="Task_0ilgwhw" targetRef="Task_13sybx8" />
+ <bpmn2:scriptTask id="Task_0ilgwhw" name="PreProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0hvg70o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ib8gb8" sourceRef="Task_1mt62gu" targetRef="ScriptTask_3" />
+ <bpmn2:scriptTask id="Task_1mt62gu" name="PostProcess Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qnzi6i</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ib8gb8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_18j1ow5" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_0vy2zge" />
+ <bpmn2:scriptTask id="Task_1opcb4j" name="Query A&#38;AI for VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0y0jt4l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_053qjfy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.queryAAIForVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0y0jt4l" sourceRef="ScriptTask_1" targetRef="Task_1opcb4j" />
+ <bpmn2:scriptTask id="Task_1rxiqe1" name="Check If VNF Is In Maintenance in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16mo99z</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09lrk4q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.checkIfVnfInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0usxnlk" sourceRef="Task_0vy2zge" targetRef="ExclusiveGateway_0q323wc" />
+ <bpmn2:scriptTask id="Task_0ap39ka" name="Set VNF inMaintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0baosqi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1eezqx8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k3fx7p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.setVnfInMaintFlagInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1drglpt" name="Unset VNF In Maintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1nr9o85</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_16ff86u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12mfil6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.setVnfInMaintFlagInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0vy2zge" name="Check If Physical Servers Are Locked in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_179tyul</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0usxnlk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.checkIfPserversInMaintInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xx8y1s" sourceRef="Task_1dtbnuy" targetRef="ExclusiveGateway_1slvyx2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a6pdza" sourceRef="Task_1fj63ov" targetRef="ExclusiveGateway_1ichg7h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13h26h9" sourceRef="Task_1cfkcss" targetRef="ExclusiveGateway_1etgtgi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1uno5rs" sourceRef="Task_1hdg951" targetRef="ExclusiveGateway_02tj4dw" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c79909" sourceRef="Task_1ca5ctq" targetRef="ExclusiveGateway_1gn5lab" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xfbwpi" sourceRef="Task_1sove95" targetRef="ExclusiveGateway_123vjyo" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0q323wc" name="Error on PServers Check?" default="SequenceFlow_16mo99z">
+ <bpmn2:incoming>SequenceFlow_0usxnlk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16mo99z</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_06ev8or</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16mo99z" name="no" sourceRef="ExclusiveGateway_0q323wc" targetRef="Task_1rxiqe1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045e1uz" name="Error On inMaintenance Check?" default="SequenceFlow_0baosqi">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0baosqi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1cdfjed</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0baosqi" name="no" sourceRef="ExclusiveGateway_045e1uz" targetRef="Task_0ap39ka" />
+ <bpmn2:callActivity id="Task_0q5cdit" name="Rainy Day Handler" calledElement="RainyDayHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="nfRole" target="vnfType" />
+ <camunda:in source="currentActivity" target="currentActivity" />
+ <camunda:in source="workStep" target="workStep" />
+ <camunda:in source="failedActivity" target="failedActivity" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:in source="errorText" target="errorText" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="handlingCode" target="disposition" />
+ <camunda:in source="requestorId" target="requestorId" />
+ <camunda:out source="taskId" target="taskId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0nob5cp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0v0u7mf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0v0u7mf" sourceRef="Task_0q5cdit" targetRef="ExclusiveGateway_0xlxgl0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vpd06n" name="Abort" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_1tg549h">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Abort"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qr8msw" name="Rollback" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="Task_0zbogrm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Rollback"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ud5uwa" name="Eror on inMaintenance Set?" default="SequenceFlow_06ajc11">
+ <bpmn2:incoming>SequenceFlow_0k3fx7p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17g62fl</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_06ajc11</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3fx7p" sourceRef="Task_0ap39ka" targetRef="ExclusiveGateway_0ud5uwa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qy68ib" name="no" sourceRef="ExclusiveGateway_1slvyx2" targetRef="Task_1fj63ov" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1ichg7h" name="Error on Upgrade PreCheck?" default="SequenceFlow_0q0qan8">
+ <bpmn2:incoming>SequenceFlow_0a6pdza</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q0qan8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_02mk8vs</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0q0qan8" name="no" sourceRef="ExclusiveGateway_1ichg7h" targetRef="Task_1cfkcss" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1etgtgi" name="Error on Quiesce Traffic?" default="SequenceFlow_1c0vdki">
+ <bpmn2:incoming>SequenceFlow_13h26h9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c0vdki</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11o5j55</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c0vdki" name="no" sourceRef="ExclusiveGateway_1etgtgi" targetRef="Task_0eae8go" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02tj4dw" name="Error on Upgrade Software?" default="SequenceFlow_162mm0m">
+ <bpmn2:incoming>SequenceFlow_1uno5rs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_162mm0m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1gagrha</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_162mm0m" name="no" sourceRef="ExclusiveGateway_02tj4dw" targetRef="Task_1ca5ctq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gn5lab" name="Error on Post Health Check?" default="SequenceFlow_1c2xyhk">
+ <bpmn2:incoming>SequenceFlow_1c79909</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1urpp94</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1c2xyhk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0l2z6wc" name="Erorr on inMaintenance Unset?" default="SequenceFlow_0u6ho2p">
+ <bpmn2:incoming>SequenceFlow_12mfil6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0u6ho2p</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0k3zxpd</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_12mfil6" sourceRef="Task_1drglpt" targetRef="ExclusiveGateway_0l2z6wc" />
+ <bpmn2:scriptTask id="Task_1tg549h" name="Abort Processing" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vpd06n</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1c022sy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0h64c4o</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0syfgbo</bpmn2:incoming>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.abortProcessing(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0xlxgl0" name="Check Disposition">
+ <bpmn2:incoming>SequenceFlow_0v0u7mf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qr8msw</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05gpym3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0vpd06n</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ijc733</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0y82zzx" name="Next Step?&#10;&#10;" default="SequenceFlow_1c022sy">
+ <bpmn2:incoming>SequenceFlow_05gpym3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1kntfys</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nlqlwn</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1c022sy</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ueoglv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15fqlwe</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0yuj0l5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1abb030</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ls3ej5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ar6ikk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_171iq7e</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1553o9f</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dmxwel</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1id2p8y</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0t53vux</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11ck4qe</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16d2ln4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1quapjx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_101n488</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_021ah63</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_05gpym3" name="Skip" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Skip"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19ba94v" sourceRef="Task_0eae8go" targetRef="ExclusiveGateway_19an3h2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1nlqlwn" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0ee7wot">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "QuiesceTraffic") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Snapshot")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c022sy" sourceRef="ExclusiveGateway_0y82zzx" targetRef="Task_1tg549h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06ev8or" name="yes" sourceRef="ExclusiveGateway_0q323wc" targetRef="IntermediateThrowEvent_0zmqbae">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0zmqbae" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_06ev8or</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nob5cp" sourceRef="IntermediateThrowEvent_0z0t7rn" targetRef="Task_0q5cdit" />
+ <bpmn2:sequenceFlow id="SequenceFlow_076leae" sourceRef="Task_0e313zv" targetRef="ExclusiveGateway_1rglbmr" />
+ <bpmn2:scriptTask id="Task_0e313zv" name="Check If VF Closed Loop Disabled in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0zzwdwf</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_06ajc11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_076leae</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.checkIfClosedLoopDisabledInAAI(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1rglbmr" name="Error on isClosedLoopDisabled Check?" default="SequenceFlow_0du9273">
+ <bpmn2:incoming>SequenceFlow_076leae</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0du9273</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0zh8r6j</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0du9273" name="no&#10;&#10;" sourceRef="ExclusiveGateway_1rglbmr" targetRef="Task_0n1d5f2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0z0t7rn" name="To Rainy Day Handling" camunda:asyncBefore="true">
+ <bpmn2:outgoing>SequenceFlow_0nob5cp</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1qkzlba" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1cdfjed</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cdfjed" name="yes" sourceRef="ExclusiveGateway_045e1uz" targetRef="IntermediateThrowEvent_1qkzlba">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0rnlvmz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_17g62fl</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_17g62fl" name="yes" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="IntermediateThrowEvent_0rnlvmz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v69raz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0zh8r6j</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zh8r6j" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_1rglbmr" targetRef="IntermediateThrowEvent_0v69raz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_15hlkuq" name="To inMaintenanceCheck">
+ <bpmn2:outgoing>SequenceFlow_09lrk4q</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To inMaintenanceCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_09lrk4q" sourceRef="IntermediateThrowEvent_15hlkuq" targetRef="Task_1rxiqe1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1eezqx8" sourceRef="IntermediateThrowEvent_1lrkrsn" targetRef="Task_0ap39ka" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1lrkrsn" name="To InMaintenance Set">
+ <bpmn2:outgoing>SequenceFlow_1eezqx8</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To InMaintenance Set" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1wdxgjm" name="To check if Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_0zzwdwf</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To check if Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zzwdwf" sourceRef="IntermediateThrowEvent_1wdxgjm" targetRef="Task_0e313zv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06ajc11" name="no" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="Task_0e313zv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_179z9vl" sourceRef="Task_0n1d5f2" targetRef="ExclusiveGateway_148eo7w" />
+ <bpmn2:scriptTask id="Task_0n1d5f2" name="Set VF Is Closed Loop Disabled Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0du9273</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_032tm9y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_179z9vl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.setClosedLoopDisabledInAAI(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_032tm9y" sourceRef="IntermediateThrowEvent_1552q1o" targetRef="Task_0n1d5f2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1552q1o" name="To set Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_032tm9y</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To set Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_148eo7w" name="Error on Set IsClosedLoopDisabled Flag in A&#38;AI?" default="SequenceFlow_1cjiv6i">
+ <bpmn2:incoming>SequenceFlow_179z9vl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cjiv6i</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1q3oxtf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cjiv6i" name="no&#10;&#10;" sourceRef="ExclusiveGateway_148eo7w" targetRef="Task_1dtbnuy" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16r1jxm" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1q3oxtf</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q3oxtf" name="yes" sourceRef="ExclusiveGateway_148eo7w" targetRef="IntermediateThrowEvent_16r1jxm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1agn6fn" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1j81s6b</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1j81s6b" name="yes" sourceRef="ExclusiveGateway_1slvyx2" targetRef="IntermediateThrowEvent_1agn6fn">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_02hirbh" name="To Upgrade PreCheck">
+ <bpmn2:outgoing>SequenceFlow_16t9vai</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Upgrade PreCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16t9vai" sourceRef="IntermediateThrowEvent_02hirbh" targetRef="Task_1fj63ov" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0pnzq4y" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_02mk8vs</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_02mk8vs" name="yes" sourceRef="ExclusiveGateway_1ichg7h" targetRef="IntermediateThrowEvent_0pnzq4y">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1s7qalx" name="To Quiesce Traffic">
+ <bpmn2:outgoing>SequenceFlow_1urt6le</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Quiesce Traffic" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1urt6le" sourceRef="IntermediateThrowEvent_1s7qalx" targetRef="Task_1cfkcss" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0l0rp9y" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_11o5j55</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11o5j55" name="yes" sourceRef="ExclusiveGateway_1etgtgi" targetRef="IntermediateThrowEvent_0l0rp9y">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19an3h2" name="Error on SnapShot?" default="SequenceFlow_1fuaq5k">
+ <bpmn2:incoming>SequenceFlow_19ba94v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fuaq5k</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_04gth9f</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1fuaq5k" name="no" sourceRef="ExclusiveGateway_19an3h2" targetRef="Task_1mdr1nd" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0a1s69h" name="To SnapShot">
+ <bpmn2:outgoing>SequenceFlow_0if6xj4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To SnapShot" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0if6xj4" sourceRef="IntermediateThrowEvent_0a1s69h" targetRef="Task_0eae8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04gth9f" name="yes" sourceRef="ExclusiveGateway_19an3h2" targetRef="IntermediateThrowEvent_11vs7u4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_11vs7u4" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_04gth9f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1v59be9" sourceRef="IntermediateThrowEvent_162mb2a" targetRef="Task_1mdr1nd" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_162mb2a" name="To Upgrade Backup">
+ <bpmn2:outgoing>SequenceFlow_1v59be9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Upgrade Backup" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ssvndw" name="Error on UpgradeBackup?" default="SequenceFlow_0txgesu">
+ <bpmn2:incoming>SequenceFlow_04rprct</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uceq96</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0txgesu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_04rprct" sourceRef="Task_1mdr1nd" targetRef="ExclusiveGateway_0ssvndw" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1yfd3sz" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1uceq96</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uceq96" name="yes" sourceRef="ExclusiveGateway_0ssvndw" targetRef="IntermediateThrowEvent_1yfd3sz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0txgesu" name="no" sourceRef="ExclusiveGateway_0ssvndw" targetRef="Task_1hdg951" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0trguug" sourceRef="Task_0h2nq31" targetRef="ExclusiveGateway_1ozuicc" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1ozuicc" name="Error on Resume Traffic?" default="SequenceFlow_1q3bwlt">
+ <bpmn2:incoming>SequenceFlow_0trguug</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q3bwlt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1xg6pwh</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q3bwlt" name="no" sourceRef="ExclusiveGateway_1ozuicc" targetRef="Task_1sove95" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_123vjyo" name="Error on VNF Unlock?" default="SequenceFlow_1nr9o85">
+ <bpmn2:incoming>SequenceFlow_1xfbwpi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nr9o85</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ttowkv</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1nr9o85" name="no" sourceRef="ExclusiveGateway_123vjyo" targetRef="Task_1drglpt" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1nij04n" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1gagrha</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1gagrha" name="yes" sourceRef="ExclusiveGateway_02tj4dw" targetRef="IntermediateThrowEvent_1nij04n">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_16igl7b" sourceRef="IntermediateThrowEvent_0fhmhsk" targetRef="Task_1ca5ctq" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0fhmhsk" name="To Upgrade PostCheck">
+ <bpmn2:outgoing>SequenceFlow_16igl7b</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Upgrade PostCheck" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1urpp94" name="yes" sourceRef="ExclusiveGateway_1gn5lab" targetRef="IntermediateThrowEvent_0vf0a28">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0vf0a28" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1urpp94</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c2xyhk" name="no" sourceRef="ExclusiveGateway_1gn5lab" targetRef="Task_0h2nq31" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0pxvl24" name="To Resume Traffic">
+ <bpmn2:outgoing>SequenceFlow_0yja56j</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Resume Traffic" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0yja56j" sourceRef="IntermediateThrowEvent_0pxvl24" targetRef="Task_0h2nq31" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xg6pwh" name="yes" sourceRef="ExclusiveGateway_1ozuicc" targetRef="IntermediateThrowEvent_1vjqksl">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1vjqksl" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1xg6pwh</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1vwqesb" name="To VNF Unlock">
+ <bpmn2:outgoing>SequenceFlow_1hwtq9x</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hwtq9x" sourceRef="IntermediateThrowEvent_1vwqesb" targetRef="Task_1sove95" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ttowkv" name="yes" sourceRef="ExclusiveGateway_123vjyo" targetRef="IntermediateThrowEvent_0m9jtv2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0m9jtv2" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0ttowkv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0pk24h2" name="To Upgrade Software">
+ <bpmn2:outgoing>SequenceFlow_1colra4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Upgrade Software" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1colra4" sourceRef="IntermediateThrowEvent_0pk24h2" targetRef="Task_1hdg951" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_18j1ow5" name="Error on Unset Closed Loop Disabled?" default="SequenceFlow_3">
+ <bpmn2:incoming>SequenceFlow_1tzax6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w8mkkn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u6ho2p" name="no" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="Task_0y1h8go" />
+ <bpmn2:scriptTask id="Task_0y1h8go" name="Unset VF Is Closed Loop DisabledFlag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0u6ho2p</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09xxorv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1tzax6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.setClosedLoopDisabledInAAI(execution, false)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tzax6l" sourceRef="Task_0y1h8go" targetRef="ExclusiveGateway_18j1ow5" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0pmevcz" name="To unset inMaintenance">
+ <bpmn2:outgoing>SequenceFlow_16ff86u</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To unset inMaintenance" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16ff86u" sourceRef="IntermediateThrowEvent_0pmevcz" targetRef="Task_1drglpt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0k3zxpd" name="yes" sourceRef="ExclusiveGateway_0l2z6wc" targetRef="IntermediateThrowEvent_1awckg7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1awckg7" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0k3zxpd</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1b3smly" name="To unset Closed Loop Disabled">
+ <bpmn2:outgoing>SequenceFlow_09xxorv</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To unset Closed Loop Disabled" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xxorv" sourceRef="IntermediateThrowEvent_1b3smly" targetRef="Task_0y1h8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w8mkkn" name="yes" sourceRef="ExclusiveGateway_18j1ow5" targetRef="IntermediateThrowEvent_1cw8gsw">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1cw8gsw" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_0w8mkkn</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0x846wp" name="To Completion Handler Prep">
+ <bpmn2:outgoing>SequenceFlow_07uuj2d</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_07uuj2d" sourceRef="IntermediateThrowEvent_0x846wp" targetRef="ScriptTask_10" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ueoglv" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0rz6jh4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkIfPserversInMaintInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkIfVnfInMaintInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_15fqlwe" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1wip9vc">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkIfVnfInMaintInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "setVnfInMaintFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0yuj0l5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1hki8xj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "setVnfInMaintFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1abb030" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1gfnt9b">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "checkClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "setClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ls3ej5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1gzhs1a">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "setClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Lock")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ar6ikk" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1p9i2bi">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradePreCheck") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "QuiesceTraffic")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_171iq7e" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0rp1ax0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Snapshot") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradeBackup")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1553o9f" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_01ngkx2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradeBackup") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradeSoftware")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dmxwel" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0lbd0cs">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradePostCheck") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "ResumeTraffic")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1id2p8y" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1ycbds3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "ResumeTraffic") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Unlock")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0t53vux" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1cp0hkt">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Unlock") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_11ck4qe" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_184w0i8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "unsetVnfInMaintFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "unsetClosedLoopDisabledFlagInAAI")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_16d2ln4" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1u9f9kp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "unsetClosedLoopDisabledFlagInAAI") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "completionHandlerPrep")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0rz6jh4" name="To inMaintenanceCheck">
+ <bpmn2:incoming>SequenceFlow_0ueoglv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To inMaintenanceCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1wip9vc" name="To InMaintenance Set">
+ <bpmn2:incoming>SequenceFlow_15fqlwe</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To InMaintenance Set" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1hki8xj" name="To check if Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_0yuj0l5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To check if Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gfnt9b" name="To set Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_1abb030</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To set Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1gzhs1a" name="To VNF Lock">
+ <bpmn2:incoming>SequenceFlow_0ls3ej5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0385ons" name="To Upgrade PreCheck">
+ <bpmn2:incoming>SequenceFlow_1quapjx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Upgrade PreCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1quapjx" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0385ons">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Lock") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradePreCheck")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1p9i2bi" name="To Quiesce Traffic">
+ <bpmn2:incoming>SequenceFlow_1ar6ikk</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Quiesce Traffic" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0ee7wot" name="To SnapShot">
+ <bpmn2:incoming>SequenceFlow_1nlqlwn</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To SnapShot" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0rp1ax0" name="To Upgrade Backup">
+ <bpmn2:incoming>SequenceFlow_171iq7e</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Upgrade Backup" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_01ngkx2" name="To Upgrade Software">
+ <bpmn2:incoming>SequenceFlow_1553o9f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Upgrade Software" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lbd0cs" name="To Resume Traffic">
+ <bpmn2:incoming>SequenceFlow_0dmxwel</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Resume Traffic" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1ycbds3" name="To VNF Unlock">
+ <bpmn2:incoming>SequenceFlow_1id2p8y</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To VNF Unlock" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1cp0hkt" name="To unset inMaintenance">
+ <bpmn2:incoming>SequenceFlow_0t53vux</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To unset inMaintenance" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_184w0i8" name="To unset Closed Loop Disabled">
+ <bpmn2:incoming>SequenceFlow_11ck4qe</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To unset Closed Loop Disabled" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1u9f9kp" name="To Completion Handler Prep">
+ <bpmn2:incoming>SequenceFlow_16d2ln4</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Completion Handler Prep" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_18wrvcy" name="To check if Physical Servers Are Locked">
+ <bpmn2:outgoing>SequenceFlow_179tyul</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To check if Physical Servers Are Locked" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_179tyul" sourceRef="IntermediateThrowEvent_18wrvcy" targetRef="Task_0vy2zge" />
+ <bpmn2:sequenceFlow id="SequenceFlow_101n488" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_17k1fmk">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "checkIfPserversInMaintInAAI"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_17k1fmk" name="To check if Physical Servers Are Locked">
+ <bpmn2:incoming>SequenceFlow_101n488</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To check if Physical Servers Are Locked" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1m7fq7a" name="To VNF Lock">
+ <bpmn2:outgoing>SequenceFlow_1ood2pr</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To VNF Lock" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ood2pr" sourceRef="IntermediateThrowEvent_1m7fq7a" targetRef="Task_1dtbnuy" />
+ <bpmn2:callActivity id="Task_0eae8go" name="Call APP-C SnapShot" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionSnapshot" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vmIdList" target="vmIdList" />
+ <camunda:in source="aicIdentity" target="identityUrl" />
+ <camunda:in source="controllerType" target="controllerType" />
+ <camunda:in source="vserverIdList" target="vserverIdList" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1c0vdki</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0if6xj4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19ba94v</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1dtbnuy" name="Call APP-C VNF Lock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionLock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1cjiv6i</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1ood2pr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xx8y1s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1sove95" name="Call APP-C VNF Unlock" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUnlock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:out source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q3bwlt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1hwtq9x</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xfbwpi</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1fj63ov" name="Call APP-C UpgradePreCheck" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUpgradePreCheck" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qy68ib</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_16t9vai</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a6pdza</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1ca5ctq" name="Call APP-C Upgrade PostCheck" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUpgradePostCheck" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_162mm0m</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_16igl7b</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c79909</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1kbtw2p" name="To Upgrade PostCheck">
+ <bpmn2:incoming>SequenceFlow_021ah63</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Upgrade PostCheck" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_021ah63" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1kbtw2p">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradeSoftware") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradePostCheck")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_1qr054i" name="Increment Retry Count" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ijc733</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ai205d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.incrementRetryCount(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1g8h3lt" name="Retries Left?" default="SequenceFlow_0h64c4o">
+ <bpmn2:incoming>SequenceFlow_0a2cv6d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kntfys</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0h64c4o</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1bv97n4" name="RetryTimer">
+ <bpmn2:incoming>SequenceFlow_0ai205d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a2cv6d</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT1M</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ai205d" sourceRef="ScriptTask_1qr054i" targetRef="IntermediateCatchEvent_1bv97n4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a2cv6d" sourceRef="IntermediateCatchEvent_1bv97n4" targetRef="ExclusiveGateway_1g8h3lt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ijc733" name="Retry" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ScriptTask_1qr054i">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Retry"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kntfys" name="yes" sourceRef="ExclusiveGateway_1g8h3lt" targetRef="ExclusiveGateway_0y82zzx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[String retryVariableName = execution.getVariable('retryCountVariableName')
+
+execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0h64c4o" name="no" sourceRef="ExclusiveGateway_1g8h3lt" targetRef="Task_1tg549h" />
+ <bpmn2:callActivity id="Task_0zbogrm" name="Rollback Processing" calledElement="RollbackVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="rollbackSetClosedLoopDisabledFlag" target="rollbackSetClosedLoopDisabledFlag" />
+ <camunda:in source="rollbackSetVnfInMaintenanceFlag" target="rollbackSetVnfInMaintenanceFlag" />
+ <camunda:in source="rollbackVnfStop" target="rollbackVnfStop" />
+ <camunda:in source="rollbackVnfLock" target="rollbackVnfLock" />
+ <camunda:in source="errorCode" target="errorCode" />
+ <camunda:out source="rollbackSuccessful" target="rollbackSuccessful" />
+ <camunda:in source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qr8msw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0syfgbo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0syfgbo" sourceRef="Task_0zbogrm" targetRef="Task_1tg549h" />
+ <bpmn2:callActivity id="Task_1cfkcss" name="Call APP-C QuiesceTraffic" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionQuiesceTraffic" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:out source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0q0qan8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1urt6le</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13h26h9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1mdr1nd" name="Call APP-C Upgrade Backup" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUpgradeBackup" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1fuaq5k</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1v59be9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04rprct</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_1hdg951" name="Call APP-C Upgrade Software" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUpgradeSoftware" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0txgesu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1colra4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uno5rs</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="Task_0h2nq31" name="Call APP-C Resume Traffic" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionResumeTraffic" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:out source="rollbackQuiesceTraffic" target="rollbackQuiesceTraffic" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1c2xyhk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0yja56j</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0trguug</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1slvyx2" name="Error on VNF Lock?" default="SequenceFlow_0qy68ib">
+ <bpmn2:incoming>SequenceFlow_0xx8y1s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j81s6b</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0qy68ib</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VnfInPlaceUpdate">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="97" y="72" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="103" y="113" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds x="569" y="1073" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="568" y="1114" width="38" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="133" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="209" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="309" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="341" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="373" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125">
+ <di:waypoint xsi:type="dc:Point" x="473" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="513" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="493" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="415" y="1051" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
+ <di:waypoint xsi:type="dc:Point" x="515" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="549" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="549" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="569" y="1091" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="564" y="1091" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="126" y="1051" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds x="269" y="1051" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
+ <di:waypoint xsi:type="dc:Point" x="226" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="269" y="1091" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="263" y="1091" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="103" y="1374" width="836" height="242" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds x="167" y="1468" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="1509" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="613" y="1446" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">
+ <di:waypoint xsi:type="dc:Point" x="203" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="233" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="218" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">
+ <di:waypoint xsi:type="dc:Point" x="713" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="731" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds x="880" y="1468" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="1509" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="921" y="1468" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="939" y="1509" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds x="997" y="1468" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1015" y="1509" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">
+ <di:waypoint xsi:type="dc:Point" x="957" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="997" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="977" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds x="748" y="1446" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="369" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="415" y="1091" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="407" y="1091" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
+ <di:waypoint xsi:type="dc:Point" x="848" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="880" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="1459" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1561" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1561" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="99" y="989" />
+ <di:waypoint xsi:type="dc:Point" x="99" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="1091" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1482" y="772.5275881403734" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_053qjfy_di" bpmnElement="SequenceFlow_053qjfy">
+ <di:waypoint xsi:type="dc:Point" x="671" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08xzuox_di" bpmnElement="Task_1opcb4j">
+ <dc:Bounds x="571" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y0jt4l_di" bpmnElement="SequenceFlow_0y0jt4l">
+ <di:waypoint xsi:type="dc:Point" x="473" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="90" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="522" y="75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19pf9z8_di" bpmnElement="Task_1rxiqe1">
+ <dc:Bounds x="373" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0usxnlk_di" bpmnElement="SequenceFlow_0usxnlk">
+ <di:waypoint xsi:type="dc:Point" x="231" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="279" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="255" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wa4zya_di" bpmnElement="Task_0ap39ka">
+ <dc:Bounds x="608" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sgm9bu_di" bpmnElement="Task_1drglpt">
+ <dc:Bounds x="1058" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16jtt5t_di" bpmnElement="Task_0vy2zge">
+ <dc:Bounds x="131" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xx8y1s_di" bpmnElement="SequenceFlow_0xx8y1s">
+ <di:waypoint xsi:type="dc:Point" x="226" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="246" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a6pdza_di" bpmnElement="SequenceFlow_0a6pdza">
+ <di:waypoint xsi:type="dc:Point" x="464" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="513" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="489" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13h26h9_di" bpmnElement="SequenceFlow_13h26h9">
+ <di:waypoint xsi:type="dc:Point" x="700" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="735" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="718" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uno5rs_di" bpmnElement="SequenceFlow_1uno5rs">
+ <di:waypoint xsi:type="dc:Point" x="223" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="245" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c79909_di" bpmnElement="SequenceFlow_1c79909">
+ <di:waypoint xsi:type="dc:Point" x="464" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="513" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="489" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xfbwpi_di" bpmnElement="SequenceFlow_1xfbwpi">
+ <di:waypoint xsi:type="dc:Point" x="926" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0q323wc_di" bpmnElement="ExclusiveGateway_0q323wc" isMarkerVisible="true">
+ <dc:Bounds x="279" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="260" y="173" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16mo99z_di" bpmnElement="SequenceFlow_16mo99z">
+ <di:waypoint xsi:type="dc:Point" x="329" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="213" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045e1uz_di" bpmnElement="ExclusiveGateway_045e1uz" isMarkerVisible="true">
+ <dc:Bounds x="513" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="163" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0baosqi_di" bpmnElement="SequenceFlow_0baosqi">
+ <di:waypoint xsi:type="dc:Point" x="563" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="579" y="214" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1k5n5d1_di" bpmnElement="Task_0q5cdit">
+ <dc:Bounds x="1592" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v0u7mf_di" bpmnElement="SequenceFlow_0v0u7mf">
+ <di:waypoint xsi:type="dc:Point" x="1692" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1774" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1733" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vpd06n_di" bpmnElement="SequenceFlow_0vpd06n">
+ <di:waypoint xsi:type="dc:Point" x="1799" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="392" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1806" y="430.60504201680675" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qr8msw_di" bpmnElement="SequenceFlow_1qr8msw">
+ <di:waypoint xsi:type="dc:Point" x="1799" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="604" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1778" y="553" width="42" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ud5uwa_di" bpmnElement="ExclusiveGateway_0ud5uwa" isMarkerVisible="true">
+ <dc:Bounds x="735" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="731" y="166" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3fx7p_di" bpmnElement="SequenceFlow_0k3fx7p">
+ <di:waypoint xsi:type="dc:Point" x="708" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="735" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qy68ib_di" bpmnElement="SequenceFlow_0qy68ib">
+ <di:waypoint xsi:type="dc:Point" x="316" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="341" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="341" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="487" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ichg7h_di" bpmnElement="ExclusiveGateway_1ichg7h" isMarkerVisible="true">
+ <dc:Bounds x="513" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="443" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q0qan8_di" bpmnElement="SequenceFlow_0q0qan8">
+ <di:waypoint xsi:type="dc:Point" x="563" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="600" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="491" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1etgtgi_di" bpmnElement="ExclusiveGateway_1etgtgi" isMarkerVisible="true">
+ <dc:Bounds x="735" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="716" y="445" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c0vdki_di" bpmnElement="SequenceFlow_1c0vdki">
+ <di:waypoint xsi:type="dc:Point" x="785" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="804" y="487" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02tj4dw_di" bpmnElement="ExclusiveGateway_02tj4dw" isMarkerVisible="true">
+ <dc:Bounds x="266" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="247" y="735" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_162mm0m_di" bpmnElement="SequenceFlow_162mm0m">
+ <di:waypoint xsi:type="dc:Point" x="316" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="780" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gn5lab_di" bpmnElement="ExclusiveGateway_1gn5lab" isMarkerVisible="true">
+ <dc:Bounds x="513" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="735" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0l2z6wc_di" bpmnElement="ExclusiveGateway_0l2z6wc" isMarkerVisible="true">
+ <dc:Bounds x="1195" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1183" y="728" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12mfil6_di" bpmnElement="SequenceFlow_12mfil6">
+ <di:waypoint xsi:type="dc:Point" x="1158" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1195" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1178" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lb0lk5_di" bpmnElement="Task_1tg549h">
+ <dc:Bounds x="1749" y="312" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gmvi7n_di" bpmnElement="ExclusiveGateway_0xlxgl0" isMarkerVisible="true">
+ <dc:Bounds x="1774" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1755" y="467" width="88" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0y82zzx_di" bpmnElement="ExclusiveGateway_0y82zzx" isMarkerVisible="true">
+ <dc:Bounds x="2087" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2047" y="477" width="54" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05gpym3_di" bpmnElement="SequenceFlow_05gpym3">
+ <di:waypoint xsi:type="dc:Point" x="1824" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="2087" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1922" y="516" width="21" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ba94v_di" bpmnElement="SequenceFlow_19ba94v">
+ <di:waypoint xsi:type="dc:Point" x="926" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nlqlwn_di" bpmnElement="SequenceFlow_1nlqlwn">
+ <di:waypoint xsi:type="dc:Point" x="2137" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="2261" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="2261" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="2385" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2249" y="459" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c022sy_di" bpmnElement="SequenceFlow_1c022sy">
+ <di:waypoint xsi:type="dc:Point" x="2112" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="2112" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="1849" y="352" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2127" y="418.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ev8or_di" bpmnElement="SequenceFlow_06ev8or">
+ <di:waypoint xsi:type="dc:Point" x="304" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="288" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="288" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="314" y="273" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0o6fb4f_di" bpmnElement="IntermediateThrowEvent_0zmqbae">
+ <dc:Bounds x="286" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="343.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nob5cp_di" bpmnElement="SequenceFlow_0nob5cp">
+ <di:waypoint xsi:type="dc:Point" x="1506" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1592" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1549" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_076leae_di" bpmnElement="SequenceFlow_076leae">
+ <di:waypoint xsi:type="dc:Point" x="926" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cbpm7l_di" bpmnElement="Task_0e313zv">
+ <dc:Bounds x="826" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1rglbmr_di" bpmnElement="ExclusiveGateway_1rglbmr" isMarkerVisible="true">
+ <dc:Bounds x="955.192" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="164" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0du9273_di" bpmnElement="SequenceFlow_0du9273">
+ <di:waypoint xsi:type="dc:Point" x="1005" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1020" y="212" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1p06jf5_di" bpmnElement="IntermediateThrowEvent_0z0t7rn">
+ <dc:Bounds x="1470" y="492" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1455" y="538" width="65" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0xwlxk9_di" bpmnElement="IntermediateThrowEvent_1qkzlba">
+ <dc:Bounds x="520" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="344" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cdfjed_di" bpmnElement="SequenceFlow_1cdfjed">
+ <di:waypoint xsi:type="dc:Point" x="538" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="544" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_113xxsl_di" bpmnElement="IntermediateThrowEvent_0rnlvmz">
+ <dc:Bounds x="742" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="344" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17g62fl_di" bpmnElement="SequenceFlow_17g62fl">
+ <di:waypoint xsi:type="dc:Point" x="760" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="275" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0iyegh1_di" bpmnElement="IntermediateThrowEvent_0v69raz">
+ <dc:Bounds x="962" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="343.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zh8r6j_di" bpmnElement="SequenceFlow_0zh8r6j">
+ <di:waypoint xsi:type="dc:Point" x="980" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="308" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="285" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_07pur50_di" bpmnElement="IntermediateThrowEvent_15hlkuq">
+ <dc:Bounds x="405" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="381" y="344" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09lrk4q_di" bpmnElement="SequenceFlow_09lrk4q">
+ <di:waypoint xsi:type="dc:Point" x="423" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="423" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="438" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eezqx8_di" bpmnElement="SequenceFlow_1eezqx8">
+ <di:waypoint xsi:type="dc:Point" x="658" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="673" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1pog9t5_di" bpmnElement="IntermediateThrowEvent_1lrkrsn">
+ <dc:Bounds x="640" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="614" y="343.609" width="88" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1rtf0em_di" bpmnElement="IntermediateThrowEvent_1wdxgjm">
+ <dc:Bounds x="858" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="844" y="344" width="64" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zzwdwf_di" bpmnElement="SequenceFlow_0zzwdwf">
+ <di:waypoint xsi:type="dc:Point" x="876" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ajc11_di" bpmnElement="SequenceFlow_06ajc11">
+ <di:waypoint xsi:type="dc:Point" x="785" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="800" y="212" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_179z9vl_di" bpmnElement="SequenceFlow_179z9vl">
+ <di:waypoint xsi:type="dc:Point" x="1146" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1165" y="222" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1iio503_di" bpmnElement="Task_0n1d5f2">
+ <dc:Bounds x="1046" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_032tm9y_di" bpmnElement="SequenceFlow_032tm9y">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="308" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="292.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jhmy9d_di" bpmnElement="IntermediateThrowEvent_1552q1o">
+ <dc:Bounds x="1078" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="344" width="70" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_148eo7w_di" bpmnElement="ExclusiveGateway_148eo7w" isMarkerVisible="true">
+ <dc:Bounds x="1184.192" y="212" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1167" y="149" width="83" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cjiv6i_di" bpmnElement="SequenceFlow_1cjiv6i">
+ <di:waypoint xsi:type="dc:Point" x="1234" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1285" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1285" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1249" y="211" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1qtnv6e_di" bpmnElement="IntermediateThrowEvent_16r1jxm">
+ <dc:Bounds x="1191" y="299" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1174" y="334.609" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q3oxtf_di" bpmnElement="SequenceFlow_1q3oxtf">
+ <di:waypoint xsi:type="dc:Point" x="1209" y="262" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1215" y="270.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1uscpd8_di" bpmnElement="IntermediateThrowEvent_1agn6fn">
+ <dc:Bounds x="273" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j81s6b_di" bpmnElement="SequenceFlow_1j81s6b">
+ <di:waypoint xsi:type="dc:Point" x="291" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="291" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297" y="548" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1ogs7t2_di" bpmnElement="IntermediateThrowEvent_02hirbh">
+ <dc:Bounds x="396" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="384" y="617" width="59" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16t9vai_di" bpmnElement="SequenceFlow_16t9vai">
+ <di:waypoint xsi:type="dc:Point" x="414" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="414" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="565.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0f6lh1n_di" bpmnElement="IntermediateThrowEvent_0pnzq4y">
+ <dc:Bounds x="520" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_02mk8vs_di" bpmnElement="SequenceFlow_02mk8vs">
+ <di:waypoint xsi:type="dc:Point" x="538" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="558" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="558" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="544" y="558" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_17zqxs1_di" bpmnElement="IntermediateThrowEvent_1s7qalx">
+ <dc:Bounds x="632" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="607" y="617" width="85" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1urt6le_di" bpmnElement="SequenceFlow_1urt6le">
+ <di:waypoint xsi:type="dc:Point" x="650" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="650" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="665" y="565.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_077262y_di" bpmnElement="IntermediateThrowEvent_0l0rp9y">
+ <dc:Bounds x="742" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11o5j55_di" bpmnElement="SequenceFlow_11o5j55">
+ <di:waypoint xsi:type="dc:Point" x="760" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="548" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19an3h2_di" bpmnElement="ExclusiveGateway_19an3h2" isMarkerVisible="true">
+ <dc:Bounds x="955" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="953" y="441" width="53" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fuaq5k_di" bpmnElement="SequenceFlow_1fuaq5k">
+ <di:waypoint xsi:type="dc:Point" x="1005" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1064" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1030" y="485" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_199cotj_di" bpmnElement="IntermediateThrowEvent_0a1s69h">
+ <dc:Bounds x="858" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="844" y="617" width="63" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0if6xj4_di" bpmnElement="SequenceFlow_0if6xj4">
+ <di:waypoint xsi:type="dc:Point" x="876" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="565.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04gth9f_di" bpmnElement="SequenceFlow_04gth9f">
+ <di:waypoint xsi:type="dc:Point" x="980" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="558" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ly7m7x_di" bpmnElement="IntermediateThrowEvent_11vs7u4">
+ <dc:Bounds x="962" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1v59be9_di" bpmnElement="SequenceFlow_1v59be9">
+ <di:waypoint xsi:type="dc:Point" x="1114" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="1114" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1129" y="565.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0gvhqjf_di" bpmnElement="IntermediateThrowEvent_162mb2a">
+ <dc:Bounds x="1096" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1084" y="617" width="60" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ssvndw_di" bpmnElement="ExclusiveGateway_0ssvndw" isMarkerVisible="true">
+ <dc:Bounds x="1195.192" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1177" y="439" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04rprct_di" bpmnElement="SequenceFlow_04rprct">
+ <di:waypoint xsi:type="dc:Point" x="1164" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1195" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1180" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_14s9cw9_di" bpmnElement="IntermediateThrowEvent_1yfd3sz">
+ <dc:Bounds x="1202" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1185" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uceq96_di" bpmnElement="SequenceFlow_1uceq96">
+ <di:waypoint xsi:type="dc:Point" x="1220" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="1220" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1226" y="548" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0txgesu_di" bpmnElement="SequenceFlow_0txgesu">
+ <di:waypoint xsi:type="dc:Point" x="1245" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="123" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1259" y="488" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0trguug_di" bpmnElement="SequenceFlow_0trguug">
+ <di:waypoint xsi:type="dc:Point" x="701" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="735" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="718" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ozuicc_di" bpmnElement="ExclusiveGateway_1ozuicc" isMarkerVisible="true">
+ <dc:Bounds x="735.304" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="716" y="735" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q3bwlt_di" bpmnElement="SequenceFlow_1q3bwlt">
+ <di:waypoint xsi:type="dc:Point" x="785.304" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="800" y="775" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_123vjyo_di" bpmnElement="ExclusiveGateway_123vjyo" isMarkerVisible="true">
+ <dc:Bounds x="955" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="735" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nr9o85_di" bpmnElement="SequenceFlow_1nr9o85">
+ <di:waypoint xsi:type="dc:Point" x="1005" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1037" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1037" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1024" y="772" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11ot6vh_di" bpmnElement="IntermediateThrowEvent_1nij04n">
+ <dc:Bounds x="273" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="921.6089999999999" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gagrha_di" bpmnElement="SequenceFlow_1gagrha">
+ <di:waypoint xsi:type="dc:Point" x="291" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="291" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297" y="845.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16igl7b_di" bpmnElement="SequenceFlow_16igl7b">
+ <di:waypoint xsi:type="dc:Point" x="414" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="414" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="863" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_174wgan_di" bpmnElement="IntermediateThrowEvent_0fhmhsk">
+ <dc:Bounds x="396" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="384" y="922" width="59" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1urpp94_di" bpmnElement="SequenceFlow_1urpp94">
+ <di:waypoint xsi:type="dc:Point" x="538" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="544" y="855.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1vi3wf9_di" bpmnElement="IntermediateThrowEvent_0vf0a28">
+ <dc:Bounds x="520" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503" y="922" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c2xyhk_di" bpmnElement="SequenceFlow_1c2xyhk">
+ <di:waypoint xsi:type="dc:Point" x="563" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="577" y="775" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_165ve6q_di" bpmnElement="IntermediateThrowEvent_0pxvl24">
+ <dc:Bounds x="632" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="607" y="922" width="85" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yja56j_di" bpmnElement="SequenceFlow_0yja56j">
+ <di:waypoint xsi:type="dc:Point" x="650" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xg6pwh_di" bpmnElement="SequenceFlow_1xg6pwh">
+ <di:waypoint xsi:type="dc:Point" x="760" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="855.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0unfhc9_di" bpmnElement="IntermediateThrowEvent_1vjqksl">
+ <dc:Bounds x="742" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="922" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1om2udh_di" bpmnElement="IntermediateThrowEvent_1vwqesb">
+ <dc:Bounds x="859" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="922" width="70" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hwtq9x_di" bpmnElement="SequenceFlow_1hwtq9x">
+ <di:waypoint xsi:type="dc:Point" x="877" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="876" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="877" y="848" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ttowkv_di" bpmnElement="SequenceFlow_0ttowkv">
+ <di:waypoint xsi:type="dc:Point" x="980" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="855.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1u04oef_di" bpmnElement="IntermediateThrowEvent_0m9jtv2">
+ <dc:Bounds x="962" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="922" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1bsxf5o_di" bpmnElement="IntermediateThrowEvent_0pk24h2">
+ <dc:Bounds x="155" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="143" y="922" width="59" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1colra4_di" bpmnElement="SequenceFlow_1colra4">
+ <di:waypoint xsi:type="dc:Point" x="173" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="173" y="863" />
+ <di:waypoint xsi:type="dc:Point" x="173" y="863" />
+ <di:waypoint xsi:type="dc:Point" x="173" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="188" y="863" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_18j1ow5_di" bpmnElement="ExclusiveGateway_18j1ow5" isMarkerVisible="true">
+ <dc:Bounds x="1409.304" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1396" y="724" width="75" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u6ho2p_di" bpmnElement="SequenceFlow_0u6ho2p">
+ <di:waypoint xsi:type="dc:Point" x="1245" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1275" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1255" y="775" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08r89q9_di" bpmnElement="Task_0y1h8go">
+ <dc:Bounds x="1275" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tzax6l_di" bpmnElement="SequenceFlow_1tzax6l">
+ <di:waypoint xsi:type="dc:Point" x="1375" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1409" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1392" y="775" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_06j33fe_di" bpmnElement="IntermediateThrowEvent_0pmevcz">
+ <dc:Bounds x="1090" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="922" width="72" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ff86u_di" bpmnElement="SequenceFlow_16ff86u">
+ <di:waypoint xsi:type="dc:Point" x="1108" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="1108" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1123" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k3zxpd_di" bpmnElement="SequenceFlow_0k3zxpd">
+ <di:waypoint xsi:type="dc:Point" x="1220" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="1220" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1226" y="855.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_105mp22_di" bpmnElement="IntermediateThrowEvent_1awckg7">
+ <dc:Bounds x="1202" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1185" y="922" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0kglv4e_di" bpmnElement="IntermediateThrowEvent_1b3smly">
+ <dc:Bounds x="1307" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1285" y="922" width="79" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xxorv_di" bpmnElement="SequenceFlow_09xxorv">
+ <di:waypoint xsi:type="dc:Point" x="1325" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="1325" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1340" y="853" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w8mkkn_di" bpmnElement="SequenceFlow_0w8mkkn">
+ <di:waypoint xsi:type="dc:Point" x="1434" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="1434" y="886" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1440" y="855.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0jwgx1d_di" bpmnElement="IntermediateThrowEvent_1cw8gsw">
+ <dc:Bounds x="1416" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1399" y="922" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0zw87jy_di" bpmnElement="IntermediateThrowEvent_0x846wp">
+ <dc:Bounds x="158" y="1186" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="1221.609" width="72" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_07uuj2d_di" bpmnElement="SequenceFlow_07uuj2d">
+ <di:waypoint xsi:type="dc:Point" x="176" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="176" y="1160" />
+ <di:waypoint xsi:type="dc:Point" x="176" y="1160" />
+ <di:waypoint xsi:type="dc:Point" x="176" y="1131" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="191" y="1160" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ueoglv_di" bpmnElement="SequenceFlow_0ueoglv">
+ <di:waypoint xsi:type="dc:Point" x="2117" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="2173" y="264" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2145" y="362" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15fqlwe_di" bpmnElement="SequenceFlow_15fqlwe">
+ <di:waypoint xsi:type="dc:Point" x="2120" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="2209" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2165" y="377" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yuj0l5_di" bpmnElement="SequenceFlow_0yuj0l5">
+ <di:waypoint xsi:type="dc:Point" x="2122" y="495" />
+ <di:waypoint xsi:type="dc:Point" x="2247" y="319" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2185" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1abb030_di" bpmnElement="SequenceFlow_1abb030">
+ <di:waypoint xsi:type="dc:Point" x="2125" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="2284" y="348" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2205" y="408" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ls3ej5_di" bpmnElement="SequenceFlow_0ls3ej5">
+ <di:waypoint xsi:type="dc:Point" x="2127" y="500" />
+ <di:waypoint xsi:type="dc:Point" x="2313" y="386" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2220" y="428" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ar6ikk_di" bpmnElement="SequenceFlow_1ar6ikk">
+ <di:waypoint xsi:type="dc:Point" x="2133" y="506" />
+ <di:waypoint xsi:type="dc:Point" x="2372" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2253" y="468" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_171iq7e_di" bpmnElement="SequenceFlow_171iq7e">
+ <di:waypoint xsi:type="dc:Point" x="2134" y="513" />
+ <di:waypoint xsi:type="dc:Point" x="2372" y="553" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2253" y="518" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1553o9f_di" bpmnElement="SequenceFlow_1553o9f">
+ <di:waypoint xsi:type="dc:Point" x="2129" y="518" />
+ <di:waypoint xsi:type="dc:Point" x="2353" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2241" y="541.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dmxwel_di" bpmnElement="SequenceFlow_0dmxwel">
+ <di:waypoint xsi:type="dc:Point" x="2125" y="522" />
+ <di:waypoint xsi:type="dc:Point" x="2294" y="685" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2210" y="588.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1id2p8y_di" bpmnElement="SequenceFlow_1id2p8y">
+ <di:waypoint xsi:type="dc:Point" x="2121" y="526" />
+ <di:waypoint xsi:type="dc:Point" x="2247" y="717" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2184" y="607" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t53vux_di" bpmnElement="SequenceFlow_0t53vux">
+ <di:waypoint xsi:type="dc:Point" x="2119" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="2210" y="737" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2165" y="618" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11ck4qe_di" bpmnElement="SequenceFlow_11ck4qe">
+ <di:waypoint xsi:type="dc:Point" x="2117" y="530" />
+ <di:waypoint xsi:type="dc:Point" x="2172" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2145" y="630" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16d2ln4_di" bpmnElement="SequenceFlow_16d2ln4">
+ <di:waypoint xsi:type="dc:Point" x="2113" y="534" />
+ <di:waypoint xsi:type="dc:Point" x="2128" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2121" y="643" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_17syve1_di" bpmnElement="IntermediateThrowEvent_0rz6jh4">
+ <dc:Bounds x="2159" y="229" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2165" y="189" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nv8aic_di" bpmnElement="IntermediateThrowEvent_1wip9vc">
+ <dc:Bounds x="2199" y="256" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2213" y="235" width="89" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1g4pmwc_di" bpmnElement="IntermediateThrowEvent_1hki8xj">
+ <dc:Bounds x="2240" y="287" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2280" y="256" width="64" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ypnogn_di" bpmnElement="IntermediateThrowEvent_1gfnt9b">
+ <dc:Bounds x="2279" y="319" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2325" y="305" width="71" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1i9ttzs_di" bpmnElement="IntermediateThrowEvent_1gzhs1a">
+ <dc:Bounds x="2311" y="359" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2357" y="356" width="64" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0840e02_di" bpmnElement="IntermediateThrowEvent_0385ons">
+ <dc:Bounds x="2343" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2393" y="383" width="60" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1quapjx_di" bpmnElement="SequenceFlow_1quapjx">
+ <di:waypoint xsi:type="dc:Point" x="2130" y="503" />
+ <di:waypoint xsi:type="dc:Point" x="2345" y="416" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2239" y="445" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1xq4kx8_di" bpmnElement="IntermediateThrowEvent_1p9i2bi">
+ <dc:Bounds x="2371" y="439" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2412" y="440" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_03b4y60_di" bpmnElement="IntermediateThrowEvent_0ee7wot">
+ <dc:Bounds x="2385" y="493" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2433" y="503" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1ghdnpx_di" bpmnElement="IntermediateThrowEvent_0rp1ax0">
+ <dc:Bounds x="2371" y="538" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2424" y="544" width="60" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1nls1oo_di" bpmnElement="IntermediateThrowEvent_01ngkx2">
+ <dc:Bounds x="2352" y="582" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2401" y="587" width="60" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0qt249a_di" bpmnElement="IntermediateThrowEvent_0lbd0cs">
+ <dc:Bounds x="2289" y="679" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2337" y="706" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0frwxx8_di" bpmnElement="IntermediateThrowEvent_1ycbds3">
+ <dc:Bounds x="2240" y="713" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2276" y="741" width="74" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1vcx5cz_di" bpmnElement="IntermediateThrowEvent_1cp0hkt">
+ <dc:Bounds x="2199" y="735" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2233" y="759" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1y8fmlw_di" bpmnElement="IntermediateThrowEvent_184w0i8">
+ <dc:Bounds x="2159" y="759" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2199" y="796" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_024zi9r_di" bpmnElement="IntermediateThrowEvent_1u9f9kp">
+ <dc:Bounds x="2111" y="782" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2116" y="823" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_08x53cb_di" bpmnElement="IntermediateThrowEvent_18wrvcy">
+ <dc:Bounds x="158" y="308" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="134" y="343.09862671660426" width="83" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_179tyul_di" bpmnElement="SequenceFlow_179tyul">
+ <di:waypoint xsi:type="dc:Point" x="180" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="181" y="278" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_101n488_di" bpmnElement="SequenceFlow_101n488">
+ <di:waypoint xsi:type="dc:Point" x="2113" y="486" />
+ <di:waypoint xsi:type="dc:Point" x="2127" y="255" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2120" y="356" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1fnxvhb_di" bpmnElement="IntermediateThrowEvent_17k1fmk">
+ <dc:Bounds x="2111" y="220" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2086" y="170" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1g6967r_di" bpmnElement="IntermediateThrowEvent_1m7fq7a">
+ <dc:Bounds x="158" y="582" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="617.147315855181" width="60" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ood2pr_di" bpmnElement="SequenceFlow_1ood2pr">
+ <di:waypoint xsi:type="dc:Point" x="176" y="582" />
+ <di:waypoint xsi:type="dc:Point" x="176" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="191" y="566" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1y81g09_di" bpmnElement="Task_0eae8go">
+ <dc:Bounds x="826" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0n20gvh_di" bpmnElement="Task_1dtbnuy">
+ <dc:Bounds x="126" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_08wyi5l_di" bpmnElement="Task_1sove95">
+ <dc:Bounds x="826" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1a5n5ff_di" bpmnElement="Task_1fj63ov">
+ <dc:Bounds x="364" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0mp082m_di" bpmnElement="Task_1ca5ctq">
+ <dc:Bounds x="364" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_07dp1m8_di" bpmnElement="IntermediateThrowEvent_1kbtw2p">
+ <dc:Bounds x="2324" y="634" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2345" y="668" width="60" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_021ah63_di" bpmnElement="SequenceFlow_021ah63">
+ <di:waypoint xsi:type="dc:Point" x="2127" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="2327" y="643" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2227" y="566.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1qr054i_di" bpmnElement="ScriptTask_1qr054i">
+ <dc:Bounds x="1922" y="559" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1g8h3lt_di" bpmnElement="ExclusiveGateway_1g8h3lt" isMarkerVisible="true">
+ <dc:Bounds x="2008" y="696" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2002" y="746" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1bv97n4_di" bpmnElement="IntermediateCatchEvent_1bv97n4">
+ <dc:Bounds x="1954" y="671" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1889" y="683" width="55" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ai205d_di" bpmnElement="SequenceFlow_0ai205d">
+ <di:waypoint xsi:type="dc:Point" x="1972" y="639" />
+ <di:waypoint xsi:type="dc:Point" x="1972" y="671" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1987" y="645" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a2cv6d_di" bpmnElement="SequenceFlow_0a2cv6d">
+ <di:waypoint xsi:type="dc:Point" x="1972" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="1972" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="2008" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1987" y="714" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ijc733_di" bpmnElement="SequenceFlow_1ijc733">
+ <di:waypoint xsi:type="dc:Point" x="1816" y="518" />
+ <di:waypoint xsi:type="dc:Point" x="1922" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1852" y="550" width="27" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kntfys_di" bpmnElement="SequenceFlow_1kntfys">
+ <di:waypoint xsi:type="dc:Point" x="2058" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="2085" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="2085" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2063" y="706" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h64c4o_di" bpmnElement="SequenceFlow_0h64c4o">
+ <di:waypoint xsi:type="dc:Point" x="2033" y="696" />
+ <di:waypoint xsi:type="dc:Point" x="2033" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="1799" y="312" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2041" y="646" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1ahvtrx_di" bpmnElement="Task_0zbogrm">
+ <dc:Bounds x="1749" y="604" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0syfgbo_di" bpmnElement="SequenceFlow_0syfgbo">
+ <di:waypoint xsi:type="dc:Point" x="1749" y="644" />
+ <di:waypoint xsi:type="dc:Point" x="1710" y="644" />
+ <di:waypoint xsi:type="dc:Point" x="1710" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="1749" y="352" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1725" y="498" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0k9fydp_di" bpmnElement="Task_1cfkcss">
+ <dc:Bounds x="600" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1kw9f96_di" bpmnElement="Task_1mdr1nd">
+ <dc:Bounds x="1064" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0d1uai9_di" bpmnElement="Task_1hdg951">
+ <dc:Bounds x="123" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1onqhy5_di" bpmnElement="Task_0h2nq31">
+ <dc:Bounds x="601" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1slvyx2_di" bpmnElement="ExclusiveGateway_1slvyx2" isMarkerVisible="true">
+ <dc:Bounds x="266" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="257" y="439" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qnzi6i_di" bpmnElement="SequenceFlow_1qnzi6i">
+ <di:waypoint xsi:type="dc:Point" x="458" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="491" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="475" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1ufdbl8_di" bpmnElement="Task_13sybx8">
+ <dc:Bounds x="358" y="1446" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hvg70o_di" bpmnElement="SequenceFlow_0hvg70o">
+ <di:waypoint xsi:type="dc:Point" x="333" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="358" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="346" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1qacr3e_di" bpmnElement="Task_0ilgwhw">
+ <dc:Bounds x="233" y="1446" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ib8gb8_di" bpmnElement="SequenceFlow_0ib8gb8">
+ <di:waypoint xsi:type="dc:Point" x="591" y="1486" />
+ <di:waypoint xsi:type="dc:Point" x="613" y="1486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="602" y="1471" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_032b6ij_di" bpmnElement="Task_1mt62gu">
+ <dc:Bounds x="491" y="1446" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelVersions.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelVersions.bpmn
new file mode 100644
index 0000000000..f7023c33fc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelVersions.bpmn
@@ -0,0 +1,330 @@
+<?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:process id="DoCompareModelVersions" name="DoCompareModelVersions" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_04rn9mp" name="DoCompareModelVersions" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1rebkae</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lkpfe2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCompareModelVersions()
+csi.doCompareModelVersions(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rebkae" sourceRef="StartEvent_0jhv664" targetRef="ScriptTask_04rn9mp" />
+ <bpmn2:intermediateCatchEvent id="StartEvent_0jhv664" name="StartCompare">
+ <bpmn2:outgoing>SequenceFlow_1rebkae</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartCompare" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="EndEvent_0x8im5g">
+ <bpmn2:incoming>SequenceFlow_1lkpfe2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lkpfe2" sourceRef="ScriptTask_04rn9mp" targetRef="EndEvent_0x8im5g" />
+ <bpmn2:subProcess id="SubProcess_0roysbg" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0xtpw6j">
+ <bpmn2:outgoing>SequenceFlow_19sogyb</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_05a2pr9">
+ <bpmn2:incoming>SequenceFlow_17mr4jl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0xk9fk3" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19sogyb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17mr4jl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19sogyb" name="" sourceRef="StartEvent_0xtpw6j" targetRef="ScriptTask_0xk9fk3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17mr4jl" name="" sourceRef="ScriptTask_0xk9fk3" targetRef="EndEvent_05a2pr9" />
+ </bpmn2:subProcess>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0se5nzs" name="GoTo Decompose_Service_Original">
+ <bpmn2:incoming>SequenceFlow_0enm2cg</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose_Service_Original" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1odhh8p" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1pe6r93</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0enm2cg</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCompareModelVersions()
+dcsi.processDecomposition_Target(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1va14ul" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo_Target" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lta49u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pe6r93</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1fau2rr" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0frea3k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lta49u</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCompareModelVersions()
+dcsi.prepareDecomposeService_Target(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_07fy2ke" name="Decompose_Service_Target">
+ <bpmn2:outgoing>SequenceFlow_0frea3k</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose_Service_Target" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pe6r93" sourceRef="CallActivity_1va14ul" targetRef="ScriptTask_1odhh8p" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0enm2cg" sourceRef="ScriptTask_1odhh8p" targetRef="IntermediateThrowEvent_0se5nzs" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lta49u" sourceRef="ScriptTask_1fau2rr" targetRef="CallActivity_1va14ul" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0frea3k" sourceRef="IntermediateCatchEvent_07fy2ke" targetRef="ScriptTask_1fau2rr" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0b436w1" name="GoTo StartCompare">
+ <bpmn2:incoming>SequenceFlow_08zjjzw</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartCompare" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1d9qb54" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1wudpuj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08zjjzw</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCompareModelVersions()
+dcsi.processDecomposition_Original(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1fc56sd" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo_Original" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04ciw70</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wudpuj</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1i06996" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1fgkvpr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04ciw70</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCompareModelVersions()
+dcsi.prepareDecomposeService_Original(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1m9q0j7" name="Decompose_Service_Original">
+ <bpmn2:outgoing>SequenceFlow_1fgkvpr</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose_Service_Original" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_08zjjzw" sourceRef="ScriptTask_1d9qb54" targetRef="IntermediateThrowEvent_0b436w1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1wudpuj" sourceRef="CallActivity_1fc56sd" targetRef="ScriptTask_1d9qb54" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04ciw70" sourceRef="ScriptTask_1i06996" targetRef="CallActivity_1fc56sd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1fgkvpr" sourceRef="IntermediateCatchEvent_1m9q0j7" targetRef="ScriptTask_1i06996" />
+ <bpmn2:startEvent id="StartEvent_13da9hl" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1chfao3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_0nie46r" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1chfao3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_164yb3r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCompareModelVersions()
+dcsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1dhdmdy" name="GoTo Decompose_Service_Target">
+ <bpmn2:incoming>SequenceFlow_164yb3r</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose_Service_Target" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1chfao3" name="" sourceRef="StartEvent_13da9hl" targetRef="ScriptTask_0nie46r" />
+ <bpmn2:sequenceFlow id="SequenceFlow_164yb3r" name="" sourceRef="ScriptTask_0nie46r" targetRef="IntermediateThrowEvent_1dhdmdy" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCompareModelVersions">
+ <bpmndi:BPMNShape id="ScriptTask_04rn9mp_di" bpmnElement="ScriptTask_04rn9mp">
+ <dc:Bounds x="426" y="426" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rebkae_di" bpmnElement="SequenceFlow_1rebkae">
+ <di:waypoint xsi:type="dc:Point" x="10" y="466" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="173" y="445" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05z1jyy_di" bpmnElement="StartEvent_0jhv664">
+ <dc:Bounds x="-26" y="448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-42" y="488" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0x8im5g_di" bpmnElement="EndEvent_0x8im5g">
+ <dc:Bounds x="1040" y="448" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1013" y="488" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lkpfe2_di" bpmnElement="SequenceFlow_1lkpfe2">
+ <di:waypoint xsi:type="dc:Point" x="526" y="466" />
+ <di:waypoint xsi:type="dc:Point" x="1040" y="466" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="738" y="445" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0roysbg_di" bpmnElement="SubProcess_0roysbg" isExpanded="true">
+ <dc:Bounds x="221" y="751" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0xtpw6j_di" bpmnElement="StartEvent_0xtpw6j">
+ <dc:Bounds x="289" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="859" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_05a2pr9_di" bpmnElement="EndEvent_05a2pr9">
+ <dc:Bounds x="582" y="818" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="465" y="859" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xk9fk3_di" bpmnElement="ScriptTask_0xk9fk3">
+ <dc:Bounds x="393" y="796" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19sogyb_di" bpmnElement="SequenceFlow_19sogyb">
+ <di:waypoint xsi:type="dc:Point" x="325" y="836" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="836" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="821" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17mr4jl_di" bpmnElement="SequenceFlow_17mr4jl">
+ <di:waypoint xsi:type="dc:Point" x="493" y="836" />
+ <di:waypoint xsi:type="dc:Point" x="582" y="836" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="405" y="821" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0se5nzs_di" bpmnElement="IntermediateThrowEvent_0se5nzs">
+ <dc:Bounds x="1048" y="189" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1022" y="230" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1odhh8p_di" bpmnElement="ScriptTask_1odhh8p">
+ <dc:Bounds x="711" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1va14ul_di" bpmnElement="CallActivity_1va14ul">
+ <dc:Bounds x="426" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1fau2rr_di" bpmnElement="ScriptTask_1fau2rr">
+ <dc:Bounds x="144" y="167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_07fy2ke_di" bpmnElement="IntermediateCatchEvent_07fy2ke">
+ <dc:Bounds x="-26" y="189" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-49" y="225" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pe6r93_di" bpmnElement="SequenceFlow_1pe6r93">
+ <di:waypoint xsi:type="dc:Point" x="526" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573.5" y="186" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0enm2cg_di" bpmnElement="SequenceFlow_0enm2cg">
+ <di:waypoint xsi:type="dc:Point" x="811" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="906" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="906" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="1048" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="876" y="201" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lta49u_di" bpmnElement="SequenceFlow_1lta49u">
+ <di:waypoint xsi:type="dc:Point" x="244" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="186" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0frea3k_di" bpmnElement="SequenceFlow_0frea3k">
+ <di:waypoint xsi:type="dc:Point" x="10" y="207" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="207" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="32" y="186" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0b436w1_di" bpmnElement="IntermediateThrowEvent_0b436w1">
+ <dc:Bounds x="1047" y="311" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1032" y="352" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1d9qb54_di" bpmnElement="ScriptTask_1d9qb54">
+ <dc:Bounds x="711" y="290" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1fc56sd_di" bpmnElement="CallActivity_1fc56sd">
+ <dc:Bounds x="426" y="290" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1i06996_di" bpmnElement="ScriptTask_1i06996">
+ <dc:Bounds x="144" y="290" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1m9q0j7_di" bpmnElement="IntermediateCatchEvent_1m9q0j7">
+ <dc:Bounds x="-26" y="312" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-50" y="348" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08zjjzw_di" bpmnElement="SequenceFlow_08zjjzw">
+ <di:waypoint xsi:type="dc:Point" x="811" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="1047" y="329" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="929" y="308.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wudpuj_di" bpmnElement="SequenceFlow_1wudpuj">
+ <di:waypoint xsi:type="dc:Point" x="526" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="330" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="618.5" y="309" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04ciw70_di" bpmnElement="SequenceFlow_04ciw70">
+ <di:waypoint xsi:type="dc:Point" x="244" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="330" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="245" y="309" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fgkvpr_di" bpmnElement="SequenceFlow_1fgkvpr">
+ <di:waypoint xsi:type="dc:Point" x="10" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="330" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-13" y="309" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_13da9hl_di" bpmnElement="StartEvent_13da9hl">
+ <dc:Bounds x="-20" y="83" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-26" y="124" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nie46r_di" bpmnElement="ScriptTask_0nie46r">
+ <dc:Bounds x="340" y="61" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1dhdmdy_di" bpmnElement="IntermediateThrowEvent_1dhdmdy">
+ <dc:Bounds x="1048" y="83" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1023" y="123" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1chfao3_di" bpmnElement="SequenceFlow_1chfao3">
+ <di:waypoint xsi:type="dc:Point" x="16" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="340" y="101" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="196" y="95" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_164yb3r_di" bpmnElement="SequenceFlow_164yb3r">
+ <di:waypoint xsi:type="dc:Point" x="440" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="1048" y="101" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="744" y="80" 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/DoCompareModelofE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..c04c2d97ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
@@ -0,0 +1,227 @@
+<?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: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">
+ <bpmn2:outgoing>SequenceFlow_1rebkae</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartCompare" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="EndEvent_0x8im5g">
+ <bpmn2:incoming>SequenceFlow_1lkpfe2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lkpfe2" sourceRef="ScriptTask_1odhh8p" targetRef="EndEvent_0x8im5g" />
+ <bpmn2:subProcess id="SubProcess_0roysbg" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0xtpw6j">
+ <bpmn2:outgoing>SequenceFlow_19sogyb</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_05a2pr9">
+ <bpmn2:incoming>SequenceFlow_17mr4jl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0xk9fk3" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19sogyb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17mr4jl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19sogyb" name="" sourceRef="StartEvent_0xtpw6j" targetRef="ScriptTask_0xk9fk3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17mr4jl" name="" sourceRef="ScriptTask_0xk9fk3" targetRef="EndEvent_05a2pr9" />
+ </bpmn2:subProcess>
+ <bpmn2:startEvent id="StartEvent_13da9hl" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1chfao3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1dhdmdy" name="GoTo StartCompare">
+ <bpmn2:incoming>SequenceFlow_1cpg3ku</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartCompare" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1chfao3" name="" sourceRef="StartEvent_13da9hl" targetRef="ScriptTask_0ba0el1" />
+ <bpmn2:callActivity id="CallActivity_1va14ul" name="Call DoCompareModelVersions" calledElement="DoCompareModelVersions">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition_Target" target="serviceDecomposition_Target" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="model-invariant-id-target" target="model-invariant-id-target" />
+ <camunda:in source="model-version-id-target" target="model-version-id-target" />
+ <camunda:in source="model-invariant-id-original" target="model-invariant-id-original" />
+ <camunda:in source="model-version-id-original" target="model-version-id-original" />
+ <camunda:out source="addResourceList" target="addResourceList" />
+ <camunda:out source="delResourceList" target="delResourceList" />
+ <camunda:out source="serviceDecomposition_Original" target="serviceDecomposition_Original" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1rebkae</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pe6r93</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1odhh8p" name="Post for Compare Model Versions&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1pe6r93</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lkpfe2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCompareModelofE2EServiceInstance()
+dcsi.postCompareModelVersions(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pe6r93" sourceRef="CallActivity_1va14ul" targetRef="ScriptTask_1odhh8p" />
+ <bpmn2:scriptTask id="ScriptTask_0ba0el1" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1chfao3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xzphe4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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: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>
+ </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_1cpg3ku" sourceRef="ScriptTask_18k4xnm" targetRef="IntermediateThrowEvent_1dhdmdy" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="139.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05z1jyy_di" bpmnElement="StartEvent_0jhv664">
+ <dc:Bounds x="-30" y="241" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-46" y="281" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0x8im5g_di" bpmnElement="EndEvent_0x8im5g">
+ <dc:Bounds x="1038" y="241" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1011" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="874.5" y="238" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0roysbg_di" bpmnElement="SubProcess_0roysbg" isExpanded="true">
+ <dc:Bounds x="216" y="387" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0xtpw6j_di" bpmnElement="StartEvent_0xtpw6j">
+ <dc:Bounds x="284" y="454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="167" y="495" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_05a2pr9_di" bpmnElement="EndEvent_05a2pr9">
+ <dc:Bounds x="577" y="454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="460" y="495" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xk9fk3_di" bpmnElement="ScriptTask_0xk9fk3">
+ <dc:Bounds x="388" y="432" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19sogyb_di" bpmnElement="SequenceFlow_19sogyb">
+ <di:waypoint xsi:type="dc:Point" x="320" y="472" />
+ <di:waypoint xsi:type="dc:Point" x="388" y="472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="457" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17mr4jl_di" bpmnElement="SequenceFlow_17mr4jl">
+ <di:waypoint xsi:type="dc:Point" x="488" y="472" />
+ <di:waypoint xsi:type="dc:Point" x="577" y="472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="457" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_13da9hl_di" bpmnElement="StartEvent_13da9hl">
+ <dc:Bounds x="-20" y="83" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-26" y="124" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1dhdmdy_di" bpmnElement="IntermediateThrowEvent_1dhdmdy">
+ <dc:Bounds x="1048" y="83" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1023" y="123" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1chfao3_di" bpmnElement="SequenceFlow_1chfao3">
+ <di:waypoint xsi:type="dc:Point" x="16" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="211" y="101" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="68.5" y="80" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1va14ul_di" bpmnElement="CallActivity_1va14ul">
+ <dc:Bounds x="363" 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" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="537" 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" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="643.5" y="79" width="0" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="983" y="95" 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/DoCreateAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
new file mode 100644
index 0000000000..d7bd54cc4e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
@@ -0,0 +1,755 @@
+<?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:process id="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+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: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:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.createAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="CreateAAIAR" targetRef="IntermediateThrowEvent_1lqaeh8" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_09xwplc</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="PreProcessSDNCAssign" targetRef="SDNCAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCAssign" targetRef="PostProcessSDNCAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCAssign" targetRef="PreProcessSDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="PreProcessSDNCCreate" targetRef="SDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCCreate" targetRef="postProcessSDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCCreate" targetRef="UpdateAAIARCreated" />
+ <bpmn2:scriptTask id="PreProcessSDNCAssign" name="PreProcess SDNC Assign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.preProcessSDNCAssign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCAssign" name="SDNC Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAssignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCAssign" name="PostProcess SDNC Assign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncAssignResponse")
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.validateSDNCResp(execution, response, "assign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCCreate" name="PreProcess SDNC Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.preProcessSDNCCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCCreate" name="SDNC Create" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncCreateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncCreateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCCreate" name="PostProcess SDNC Create " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncCreateResponse")
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.validateSDNCResp(execution, response, "create" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCActivate" name="PreProcess SDNC Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04t1zc2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06w33tk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.preProcessSDNCActivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCActivate" name="SDNC Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncActivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncActivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_06w33tk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCActivate" name="PostProcess SDNC Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncActivateResponse")
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_06w33tk" sourceRef="PreProcessSDNCActivate" targetRef="SDNCActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCActivate" targetRef="PostProcessSDNCActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCActivate" targetRef="UpdateAAIARActive" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04t1zc2" sourceRef="UpdateAAIARCreated" targetRef="PreProcessSDNCActivate" />
+ <bpmn2:callActivity id="SDNCGet" name="SDNC Get" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncGetRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncGetResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="enhancedCallbackRequestData" target="enhancedCallbackRequestData" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_030mhcm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q1hz2p</bpmn2:outgoing>
+ </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:subProcess id="SubProcess_161pl4g" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ibe7qx">
+ <bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_0t4ut76</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0ji3121" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1kgumd4" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1cxj4yz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t4ut76</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ScriptTask_0ji3121" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t4ut76" sourceRef="ScriptTask_1kgumd4" targetRef="EndEvent_1fgqhmi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ScriptTask_0ji3121" targetRef="CallActivity_0s6hs9u" />
+ <bpmn2:callActivity id="CallActivity_0s6hs9u" name="Rollback Create" calledElement="DoCreateAllottedResourceBRGRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackError" target="rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cxj4yz</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cxj4yz" sourceRef="CallActivity_0s6hs9u" targetRef="ScriptTask_1kgumd4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="UpdateAAIARActive" name="Update AAI AR Active" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dgzhsm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.updateAaiAROrchStatus(execution, "Active")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="UpdateAAIARCreated" name="Update AAI AR Created" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04t1zc2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.updateAaiAROrchStatus(execution, "Created")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCGet" name="PreProcess SDNC Get" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0z8luou</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ec9eiq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_030mhcm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.preProcessSDNCGet(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="postProcessSDNCGetResponse" name="PostProcess SDNC Get" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0q1hz2p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1iy3cqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncGetResponse")
+
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_030mhcm" sourceRef="PreProcessSDNCGet" targetRef="SDNCGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0q1hz2p" sourceRef="SDNCGet" targetRef="postProcessSDNCGetResponse" />
+ <bpmn2:exclusiveGateway id="ActiveARinAAI" name="Active AR Exists in AAI?" default="SequenceFlow_1m8u8dl">
+ <bpmn2:incoming>SequenceFlow_0gbsa12</bpmn2:incoming>
+ <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_0z8luou" name="yes" sourceRef="ActiveARinAAI" targetRef="PreProcessSDNCGet">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("foundActiveAR" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="PreProcessSDNCAssign" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1lqaeh8" name="To SDNCTasks">
+ <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>
+ <bpmn2:outgoing>SequenceFlow_09xwplc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.generateOutputs(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xwplc" sourceRef="generateOutputs" targetRef="EndEvent_3" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1f4tse6" name="Await SDNC Replication&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_1dgzhsm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ec9eiq</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncReplDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ec9eiq" sourceRef="IntermediateCatchEvent_1f4tse6" targetRef="PreProcessSDNCGet" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRG">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="19" y="199" 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="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-18" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <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" />
+ </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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1527" y="776" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1545" y="817" width="0" height="0" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1322" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="92" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="220" y="665" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="359" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="709" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="PreProcessSDNCAssign">
+ <dc:Bounds x="42" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCAssign">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCAssign">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="PreProcessSDNCCreate">
+ <dc:Bounds x="309" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCCreate">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCCreate">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0zm728u_di" bpmnElement="PreProcessSDNCActivate">
+ <dc:Bounds x="702" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCActivate">
+ <dc:Bounds x="702" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCActivate">
+ <dc:Bounds x="702" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_06w33tk_di" bpmnElement="SequenceFlow_06w33tk">
+ <di:waypoint xsi:type="dc:Point" x="752" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="752" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="742" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="715" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="802" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="704" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04t1zc2_di" bpmnElement="SequenceFlow_04t1zc2">
+ <di:waypoint xsi:type="dc:Point" x="560" y="621" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1pfpn41_di" bpmnElement="SDNCGet">
+ <dc:Bounds x="1143" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1iy3cqb_di" bpmnElement="SequenceFlow_1iy3cqb">
+ <di:waypoint xsi:type="dc:Point" x="1240" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="794" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1277" y="779" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dgzhsm_di" bpmnElement="SequenceFlow_1dgzhsm">
+ <di:waypoint xsi:type="dc:Point" x="964" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="964" y="563" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ <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>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="150" y="987" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="783" y="987" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="801" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ScriptTask_0ji3121">
+ <dc:Bounds x="245" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1kgumd4_di" bpmnElement="ScriptTask_1kgumd4">
+ <dc:Bounds x="616" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="186" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="245" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="216" y="990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4ut76_di" bpmnElement="SequenceFlow_0t4ut76">
+ <di:waypoint xsi:type="dc:Point" x="716" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="783" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1005" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="345" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="390" y="990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="UpdateAAIARActive">
+ <dc:Bounds x="914" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rfj6et_di" bpmnElement="UpdateAAIARCreated">
+ <dc:Bounds x="516" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0c8nrax_di" bpmnElement="PreProcessSDNCGet">
+ <dc:Bounds x="1140" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1xa2jlo_di" bpmnElement="postProcessSDNCGetResponse">
+ <dc:Bounds x="1140" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_030mhcm_di" bpmnElement="SequenceFlow_030mhcm">
+ <di:waypoint xsi:type="dc:Point" x="1190" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="621" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1205" y="603" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q1hz2p_di" bpmnElement="SequenceFlow_0q1hz2p">
+ <di:waypoint xsi:type="dc:Point" x="1193" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="1193" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1208" y="728.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="ActiveARinAAI" isMarkerVisible="true">
+ <dc:Bounds x="700" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="695" y="184" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="224" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
+ <di:waypoint xsi:type="dc:Point" x="725" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="505" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="270.89473684210526" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-70" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-79" y="568" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-34" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="4" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
+ <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1456" y="234" width="76" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="653" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pjzuns_di" bpmnElement="generateOutputs">
+ <dc:Bounds x="1314" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xwplc_di" bpmnElement="SequenceFlow_09xwplc">
+ <di:waypoint xsi:type="dc:Point" x="1414" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="1527" y="794" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1471" y="779" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0s6hs9u_di" bpmnElement="CallActivity_0s6hs9u">
+ <dc:Bounds x="434" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cxj4yz_di" bpmnElement="SequenceFlow_1cxj4yz">
+ <di:waypoint xsi:type="dc:Point" x="534" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="616" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="980" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1f4tse6_di" bpmnElement="IntermediateCatchEvent_1f4tse6">
+ <dc:Bounds x="946" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="492" width="61" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ec9eiq_di" bpmnElement="SequenceFlow_0ec9eiq">
+ <di:waypoint xsi:type="dc:Point" x="982" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="524" 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/DoCreateAllottedResourceBRGRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRGRollback.bpmn
new file mode 100644
index 0000000000..f369504856
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRGRollback.bpmn
@@ -0,0 +1,575 @@
+<?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:process id="DoCreateAllottedResourceBRGRollback" name="DoCreateAllottedResourceBRGRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bfuk6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_0ymy62j</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCDeactivate" targetRef="PostProcessSDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCDeactivate" targetRef="DeleteSDNC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCDelete" targetRef="postProcessSDNCDelete" />
+ <bpmn2:callActivity id="SDNCDeactivate" name="SDNC Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1fvfplx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCDeactivate" name="PostProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeactivateResponse")
+
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.validateSDNCResp(execution, response, "deactivate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDelete" name="SDNC Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeleteRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0m483rd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCDelete" name="PostProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sh1u69</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.validateSDNCResp(execution, response, "delete" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCUnassign" name="SDNC Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncUnassignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncUnassignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04hdt5s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCUnassign" name="PostProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncUnassignResponse")
+
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.validateSDNCResp(execution, response, "unassign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCUnassign" targetRef="PostProcessSDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCUnassign" targetRef="DeleteAAIAR" />
+ <bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ibe7qx">
+ <bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ProcessError" name="Process Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRGRollback rbk= new DoCreateAllottedResourceBRGRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ProcessError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ProcessError" targetRef="EndEvent_1fgqhmi" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="DeleteAAIAR" name="Delete AAI AR " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13mhe5h</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0m483td</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03bkrg4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.deleteAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="DeleteSDNC" name="Delete SDNC?&#10;" default="SequenceFlow_0m483st">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dzz8fp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0m483rd</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m483st</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="ExclusiveGateway_0vw18rq" />
+ <bpmn2:scriptTask id="UpdateAAIARPendingDelete" name="Update AAI AR PendingDelete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_144pxkp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g4cl5f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.updateAaiAROrchStatus(execution, "PendingDelete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v13nt6" name="To SDNCTasks">
+ <bpmn2:incoming>SequenceFlow_0g4cl5f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g4cl5f" sourceRef="UpdateAAIARPendingDelete" targetRef="IntermediateThrowEvent_0v13nt6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ymy62j" sourceRef="postProcessRequest" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483rd" name="Yes" sourceRef="DeleteSDNC" targetRef="SDNCDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("deleteSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483st" name="No" sourceRef="DeleteSDNC" targetRef="ExclusiveGateway_0mys1pj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bfuk6l" sourceRef="initialization" targetRef="ExclusiveGateway_1txpz34" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xm9g9s" name="No" sourceRef="ExclusiveGateway_1086eg7" targetRef="IntermediateThrowEvent_0lwqzlv" />
+ <bpmn2:subProcess id="SubProcess_0g5bd80" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_11nscgh">
+ <bpmn2:outgoing>SequenceFlow_0ebobc7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_0cexvpg" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ebobc7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ugqw84</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRGRollback rbk= new DoCreateAllottedResourceBRGRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1ce2d7j">
+ <bpmn2:incoming>SequenceFlow_1ugqw84</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ebobc7" name="" sourceRef="StartEvent_11nscgh" targetRef="ScriptTask_0cexvpg" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ugqw84" name="" sourceRef="ScriptTask_0cexvpg" targetRef="EndEvent_1ce2d7j" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcessRequest" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_03bkrg4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0oe57h4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ymy62j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRGRollback rbk = new DoCreateAllottedResourceBRGRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0mys1pj" name="Unassign SDNC?" default="SequenceFlow_0m483td">
+ <bpmn2:incoming>SequenceFlow_0sh1u69</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0m483st</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04hdt5s</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m483td</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sh1u69" sourceRef="postProcessSDNCDelete" targetRef="ExclusiveGateway_0mys1pj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04hdt5s" name="Yes" sourceRef="ExclusiveGateway_0mys1pj" targetRef="SDNCUnassign">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("unassignSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_03bkrg4" sourceRef="DeleteAAIAR" targetRef="postProcessRequest" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1086eg7" name="Rollback SDNC?" default="SequenceFlow_0xm9g9s">
+ <bpmn2:incoming>SequenceFlow_1c07scr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xm9g9s</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_144pxkp</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_144pxkp" name="Yes" sourceRef="ExclusiveGateway_1086eg7" targetRef="UpdateAAIARPendingDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackSDNC" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lwqzlv" name="To AAI Delete">
+ <bpmn2:incoming>SequenceFlow_0xm9g9s</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="AAI Delete" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483td" name="No" sourceRef="ExclusiveGateway_0mys1pj" targetRef="DeleteAAIAR" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0kdn6a5" name="AAI Delete">
+ <bpmn2:outgoing>SequenceFlow_13mhe5h</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="AAI Delete" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13mhe5h" sourceRef="IntermediateCatchEvent_0kdn6a5" targetRef="DeleteAAIAR" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1txpz34" name="Skip Rollback?" default="SequenceFlow_1c07scr">
+ <bpmn2:incoming>SequenceFlow_0bfuk6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c07scr</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0oe57h4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c07scr" name="No" sourceRef="ExclusiveGateway_1txpz34" targetRef="ExclusiveGateway_1086eg7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0oe57h4" name="Yes" sourceRef="ExclusiveGateway_1txpz34" targetRef="postProcessRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0vw18rq" name="Deactiavate SDNC?&#10;" default="SequenceFlow_0dzz8fp">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fvfplx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dzz8fp</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1fvfplx" name="Yes" sourceRef="ExclusiveGateway_0vw18rq" targetRef="SDNCDeactivate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("deactivateSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dzz8fp" name="No" sourceRef="ExclusiveGateway_0vw18rq" targetRef="DeleteSDNC" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRGRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="66" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="433" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="160" y="370" 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="101" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="160" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131" y="397" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="966" y="646" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="984" y="687" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="198" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCDeactivate">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCDelete">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCDelete">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCUnassign">
+ <dc:Bounds x="590" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCUnassign">
+ <dc:Bounds x="590" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="640" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="724.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="690" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="739" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
+ <dc:Bounds x="-9" y="962" width="367" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="20" y="1025" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="295" y="1025" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="313" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ProcessError">
+ <dc:Bounds x="125" y="1003" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="56" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="125" y="1043" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="91" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="225" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="264" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="264" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="1043" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="279" y="1043" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="DeleteAAIAR">
+ <dc:Bounds x="787" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="DeleteSDNC" isMarkerVisible="true">
+ <dc:Bounds x="197" y="761" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="648" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-180" y="767" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-189" y="808" width="59" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-144" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-112" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-112" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-79" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-97" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1k13o3m_di" bpmnElement="UpdateAAIARPendingDelete">
+ <dc:Bounds x="627" y="381" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0v13nt6_di" bpmnElement="IntermediateThrowEvent_0v13nt6">
+ <dc:Bounds x="659" y="298" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="650" y="275" width="73" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g4cl5f_di" bpmnElement="SequenceFlow_0g4cl5f">
+ <di:waypoint xsi:type="dc:Point" x="677" y="381" />
+ <di:waypoint xsi:type="dc:Point" x="677" y="334" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="692" y="357.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ymy62j_di" bpmnElement="SequenceFlow_0ymy62j">
+ <di:waypoint xsi:type="dc:Point" x="887" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="966" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_197vrli_di" bpmnElement="SequenceFlow_0m483rd">
+ <di:waypoint xsi:type="dc:Point" x="222" y="761" />
+ <di:waypoint xsi:type="dc:Point" x="222" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="672" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="230" y="732.7173913043479" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ue1x4e_di" bpmnElement="SequenceFlow_0m483st">
+ <di:waypoint xsi:type="dc:Point" x="222" y="811" />
+ <di:waypoint xsi:type="dc:Point" x="222" y="889" />
+ <di:waypoint xsi:type="dc:Point" x="355" y="889" />
+ <di:waypoint xsi:type="dc:Point" x="481" y="796" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="227.96243516445685" y="823.5028190473831" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bfuk6l_di" bpmnElement="SequenceFlow_0bfuk6l">
+ <di:waypoint xsi:type="dc:Point" x="260" y="413" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="413" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297" y="398" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xm9g9s_di" bpmnElement="SequenceFlow_0xm9g9s">
+ <di:waypoint xsi:type="dc:Point" x="495" y="386" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="334" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="477" y="353.9807135698298" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0g5bd80_di" bpmnElement="SubProcess_0g5bd80" isExpanded="true">
+ <dc:Bounds x="515" y="979" width="405" height="139" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_11nscgh_di" bpmnElement="StartEvent_11nscgh">
+ <dc:Bounds x="563" y="1036" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="1077" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0cexvpg_di" bpmnElement="ScriptTask_0cexvpg">
+ <dc:Bounds x="683" y="1014" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1ce2d7j_di" bpmnElement="EndEvent_1ce2d7j">
+ <dc:Bounds x="845" y="1036" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="863" y="1077" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ebobc7_di" bpmnElement="SequenceFlow_0ebobc7">
+ <di:waypoint xsi:type="dc:Point" x="599" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="1054" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ugqw84_di" bpmnElement="SequenceFlow_1ugqw84">
+ <di:waypoint xsi:type="dc:Point" x="783" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="845" y="1054" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="828" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_13b9eww_di" bpmnElement="postProcessRequest">
+ <dc:Bounds x="787" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0mys1pj_di" bpmnElement="ExclusiveGateway_0mys1pj" isMarkerVisible="true">
+ <dc:Bounds x="470" y="760" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="640" width="86" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sh1u69_di" bpmnElement="SequenceFlow_0sh1u69">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="452" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04hdt5s_di" bpmnElement="SequenceFlow_04hdt5s">
+ <di:waypoint xsi:type="dc:Point" x="495" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="732" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03bkrg4_di" bpmnElement="SequenceFlow_03bkrg4">
+ <di:waypoint xsi:type="dc:Point" x="837" y="742" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="704" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1086eg7_di" bpmnElement="ExclusiveGateway_1086eg7" isMarkerVisible="true">
+ <dc:Bounds x="469" y="385" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="458" y="439" width="83" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_144pxkp_di" bpmnElement="SequenceFlow_144pxkp">
+ <di:waypoint xsi:type="dc:Point" x="519" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="392.99583286074477" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0lwqzlv_di" bpmnElement="IntermediateThrowEvent_0lwqzlv">
+ <dc:Bounds x="479" y="298" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="473" y="277" width="67" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m483td_di" bpmnElement="SequenceFlow_0m483td">
+ <di:waypoint xsi:type="dc:Point" x="495" y="810" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="809" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502.01898797901157" y="825.6730723011344" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0kdn6a5_di" bpmnElement="IntermediateCatchEvent_0kdn6a5">
+ <dc:Bounds x="819" y="876" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="916" width="53" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13mhe5h_di" bpmnElement="SequenceFlow_13mhe5h">
+ <di:waypoint xsi:type="dc:Point" x="837" y="876" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="848" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="826" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="862" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1txpz34_di" bpmnElement="ExclusiveGateway_1txpz34" isMarkerVisible="true">
+ <dc:Bounds x="334" y="385" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="370" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c07scr_di" bpmnElement="SequenceFlow_1c07scr">
+ <di:waypoint xsi:type="dc:Point" x="384" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="469" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="394.9978753852595" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oe57h4_di" bpmnElement="SequenceFlow_0oe57h4">
+ <di:waypoint xsi:type="dc:Point" x="359" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="520" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0vw18rq_di" bpmnElement="ExclusiveGateway_0vw18rq" isMarkerVisible="true">
+ <dc:Bounds x="-79" y="760" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-53" y="631" width="62" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fvfplx_di" bpmnElement="SequenceFlow_1fvfplx">
+ <di:waypoint xsi:type="dc:Point" x="-54" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="-54" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-49" y="733.3483834130782" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dzz8fp_di" bpmnElement="SequenceFlow_0dzz8fp">
+ <di:waypoint xsi:type="dc:Point" x="-54" y="810" />
+ <di:waypoint xsi:type="dc:Point" x="-54" y="894" />
+ <di:waypoint xsi:type="dc:Point" x="93" y="894" />
+ <di:waypoint xsi:type="dc:Point" x="208" y="797" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-43.999999999999986" y="825" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </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
new file mode 100644
index 0000000000..f26bae0b39
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
@@ -0,0 +1,755 @@
+<?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:process id="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+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:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
+ <bpmn2:incoming>found</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:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.createAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="CreateAAIAR" targetRef="IntermediateThrowEvent_1lqaeh8" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_09xwplc</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="PreProcessSDNCAssign" targetRef="SDNCAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCAssign" targetRef="PostProcessSDNCAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCAssign" targetRef="PreProcessSDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="PreProcessSDNCCreate" targetRef="SDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCCreate" targetRef="postProcessSDNCCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCCreate" targetRef="UpdateAAIARCreated" />
+ <bpmn2:scriptTask id="PreProcessSDNCAssign" name="PreProcess SDNC Assign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.preProcessSDNCAssign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCAssign" name="SDNC Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAssignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCAssign" name="PostProcess SDNC Assign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncAssignResponse")
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.validateSDNCResp(execution, response, "assign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCCreate" name="PreProcess SDNC Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.preProcessSDNCCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCCreate" name="SDNC Create" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncCreateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncCreateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCCreate" name="PostProcess SDNC Create " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncCreateResponse")
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.validateSDNCResp(execution, response, "create" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCActivate" name="PreProcess SDNC Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04t1zc2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06w33tk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.preProcessSDNCActivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCActivate" name="SDNC Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncActivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncActivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_06w33tk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCActivate" name="PostProcess SDNC Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncActivateResponse")
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_06w33tk" sourceRef="PreProcessSDNCActivate" targetRef="SDNCActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCActivate" targetRef="PostProcessSDNCActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCActivate" targetRef="UpdateAAIARActive" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04t1zc2" sourceRef="UpdateAAIARCreated" targetRef="PreProcessSDNCActivate" />
+ <bpmn2:callActivity id="SDNCGet" name="SDNC Get" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncGetRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncGetResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="enhancedCallbackRequestData" target="enhancedCallbackRequestData" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_030mhcm</bpmn2:incoming>
+ <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>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_0t4ut76</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0ji3121" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1kgumd4" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1cxj4yz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t4ut76</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ScriptTask_0ji3121" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t4ut76" sourceRef="ScriptTask_1kgumd4" targetRef="EndEvent_1fgqhmi" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ScriptTask_0ji3121" targetRef="CallActivity_0s6hs9u" />
+ <bpmn2:callActivity id="CallActivity_0s6hs9u" name="Rollback Create" calledElement="DoCreateAllottedResourceTXCRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackError" target="rollbackError" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1cxj4yz</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1cxj4yz" sourceRef="CallActivity_0s6hs9u" targetRef="ScriptTask_1kgumd4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="UpdateAAIARActive" name="Update AAI AR Active" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_07kxd8t</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.updateAaiAROrchStatus(execution, "Active")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="UpdateAAIARCreated" name="Update AAI AR Created" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04t1zc2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.updateAaiAROrchStatus(execution, "Created")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCGet" name="PreProcess SDNC Get" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0z8luou</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08hhqb2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_030mhcm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.preProcessSDNCGet(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="postProcessSDNCGetResponse" name="PostProcess SDNC Get" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0q1hz2p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1iy3cqb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncGetResponse")
+
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_030mhcm" sourceRef="PreProcessSDNCGet" targetRef="SDNCGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0q1hz2p" sourceRef="SDNCGet" targetRef="postProcessSDNCGetResponse" />
+ <bpmn2:exclusiveGateway id="ActiveARinAAI" name="Active AR Exists in AAI?" default="SequenceFlow_1m8u8dl">
+ <bpmn2:incoming>SequenceFlow_0gbsa12</bpmn2:incoming>
+ <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_0z8luou" name="yes" sourceRef="ActiveARinAAI" targetRef="PreProcessSDNCGet">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("foundActiveAR" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="PreProcessSDNCAssign" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1lqaeh8" name="To SDNCTasks">
+ <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>
+ <bpmn2:outgoing>SequenceFlow_09xwplc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
+dcar.generateOutputs(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xwplc" sourceRef="generateOutputs" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07kxd8t" sourceRef="UpdateAAIARActive" targetRef="IntermediateThrowEvent_0ti2fv8" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0ti2fv8" name="Await SDNC Replication&#10;&#10;">
+ <bpmn2:incoming>SequenceFlow_07kxd8t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08hhqb2</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncReplDelay}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_08hhqb2" sourceRef="IntermediateThrowEvent_0ti2fv8" targetRef="PreProcessSDNCGet" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceTXC">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="19" y="199" 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="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-18" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <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" />
+ </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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1527" y="776" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1545" y="817" width="0" height="0" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1322" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="92" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="220" y="665" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="359" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="709" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="PreProcessSDNCAssign">
+ <dc:Bounds x="42" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCAssign">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCAssign">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="PreProcessSDNCCreate">
+ <dc:Bounds x="309" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCCreate">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCCreate">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0zm728u_di" bpmnElement="PreProcessSDNCActivate">
+ <dc:Bounds x="702" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCActivate">
+ <dc:Bounds x="702" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCActivate">
+ <dc:Bounds x="702" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_06w33tk_di" bpmnElement="SequenceFlow_06w33tk">
+ <di:waypoint xsi:type="dc:Point" x="752" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="752" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="752" y="742" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="715" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="802" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="963" y="704" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="883" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04t1zc2_di" bpmnElement="SequenceFlow_04t1zc2">
+ <di:waypoint xsi:type="dc:Point" x="560" y="621" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="702" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1pfpn41_di" bpmnElement="SDNCGet">
+ <dc:Bounds x="1143" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1iy3cqb_di" bpmnElement="SequenceFlow_1iy3cqb">
+ <di:waypoint xsi:type="dc:Point" x="1240" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="794" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="150" y="987" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="783" y="987" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="801" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ScriptTask_0ji3121">
+ <dc:Bounds x="245" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1kgumd4_di" bpmnElement="ScriptTask_1kgumd4">
+ <dc:Bounds x="616" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="186" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="245" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="216" y="990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4ut76_di" bpmnElement="SequenceFlow_0t4ut76">
+ <di:waypoint xsi:type="dc:Point" x="716" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="748" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="783" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1005" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="345" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="390" y="990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="UpdateAAIARActive">
+ <dc:Bounds x="914" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rfj6et_di" bpmnElement="UpdateAAIARCreated">
+ <dc:Bounds x="516" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0c8nrax_di" bpmnElement="PreProcessSDNCGet">
+ <dc:Bounds x="1140" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1xa2jlo_di" bpmnElement="postProcessSDNCGetResponse">
+ <dc:Bounds x="1140" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_030mhcm_di" bpmnElement="SequenceFlow_030mhcm">
+ <di:waypoint xsi:type="dc:Point" x="1190" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="621" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1205" y="603" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q1hz2p_di" bpmnElement="SequenceFlow_0q1hz2p">
+ <di:waypoint xsi:type="dc:Point" x="1193" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="1193" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1208" y="728.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="ActiveARinAAI" isMarkerVisible="true">
+ <dc:Bounds x="700" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="695" y="184" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="224" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
+ <di:waypoint xsi:type="dc:Point" x="725" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="505" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="270.89473684210526" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-70" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-79" y="568" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-34" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="4" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
+ <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1456" y="234" width="76" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="653" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0pjzuns_di" bpmnElement="generateOutputs">
+ <dc:Bounds x="1314" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xwplc_di" bpmnElement="SequenceFlow_09xwplc">
+ <di:waypoint xsi:type="dc:Point" x="1414" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="1527" y="794" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1471" y="779" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0s6hs9u_di" bpmnElement="CallActivity_0s6hs9u">
+ <dc:Bounds x="434" y="965" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cxj4yz_di" bpmnElement="SequenceFlow_1cxj4yz">
+ <di:waypoint xsi:type="dc:Point" x="534" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="616" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="980" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07kxd8t_di" bpmnElement="SequenceFlow_07kxd8t">
+ <di:waypoint xsi:type="dc:Point" x="964" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="964" y="563" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="979" y="587.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_038xgwf_di" bpmnElement="IntermediateThrowEvent_0ti2fv8">
+ <dc:Bounds x="946" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="492" width="61" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08hhqb2_di" bpmnElement="SequenceFlow_08hhqb2">
+ <di:waypoint xsi:type="dc:Point" x="982" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1140" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1061" y="524" 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/DoCreateAllottedResourceTXCRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXCRollback.bpmn
new file mode 100644
index 0000000000..490f2b637a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXCRollback.bpmn
@@ -0,0 +1,575 @@
+<?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:process id="DoCreateAllottedResourceTXCRollback" name="DoCreateAllottedResourceTXCRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bfuk6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_0ymy62j</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCDeactivate" targetRef="PostProcessSDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCDeactivate" targetRef="DeleteSDNC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCDelete" targetRef="postProcessSDNCDelete" />
+ <bpmn2:callActivity id="SDNCDeactivate" name="SDNC Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1fvfplx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCDeactivate" name="PostProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeactivateResponse")
+
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.validateSDNCResp(execution, response, "deactivate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDelete" name="SDNC Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeleteRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0m483rd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCDelete" name="PostProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sh1u69</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.validateSDNCResp(execution, response, "delete" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCUnassign" name="SDNC Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncUnassignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncUnassignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04hdt5s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCUnassign" name="PostProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncUnassignResponse")
+
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.validateSDNCResp(execution, response, "unassign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCUnassign" targetRef="PostProcessSDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCUnassign" targetRef="DeleteAAIAR" />
+ <bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ibe7qx">
+ <bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ProcessError" name="Process Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXCRollback rbk= new DoCreateAllottedResourceTXCRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ProcessError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ProcessError" targetRef="EndEvent_1fgqhmi" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="DeleteAAIAR" name="Delete AAI AR " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13mhe5h</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0m483td</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03bkrg4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.deleteAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="DeleteSDNC" name="Delete SDNC?&#10;" default="SequenceFlow_0m483st">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dzz8fp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0m483rd</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m483st</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="ExclusiveGateway_0vw18rq" />
+ <bpmn2:scriptTask id="UpdateAAIARPendingDelete" name="Update AAI AR PendingDelete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_144pxkp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g4cl5f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.updateAaiAROrchStatus(execution, "PendingDelete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v13nt6" name="To SDNCTasks">
+ <bpmn2:incoming>SequenceFlow_0g4cl5f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g4cl5f" sourceRef="UpdateAAIARPendingDelete" targetRef="IntermediateThrowEvent_0v13nt6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ymy62j" sourceRef="postProcessRequest" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483rd" name="Yes" sourceRef="DeleteSDNC" targetRef="SDNCDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("deleteSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483st" name="No" sourceRef="DeleteSDNC" targetRef="ExclusiveGateway_0mys1pj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bfuk6l" sourceRef="initialization" targetRef="ExclusiveGateway_1txpz34" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xm9g9s" name="No" sourceRef="ExclusiveGateway_1086eg7" targetRef="IntermediateThrowEvent_0lwqzlv" />
+ <bpmn2:subProcess id="SubProcess_0g5bd80" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_11nscgh">
+ <bpmn2:outgoing>SequenceFlow_0ebobc7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_0cexvpg" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ebobc7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ugqw84</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXCRollback rbk= new DoCreateAllottedResourceTXCRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1ce2d7j">
+ <bpmn2:incoming>SequenceFlow_1ugqw84</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ebobc7" name="" sourceRef="StartEvent_11nscgh" targetRef="ScriptTask_0cexvpg" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ugqw84" name="" sourceRef="ScriptTask_0cexvpg" targetRef="EndEvent_1ce2d7j" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="postProcessRequest" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_03bkrg4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0oe57h4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ymy62j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceTXCRollback rbk = new DoCreateAllottedResourceTXCRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0mys1pj" name="Unassign SDNC?" default="SequenceFlow_0m483td">
+ <bpmn2:incoming>SequenceFlow_0sh1u69</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0m483st</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04hdt5s</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m483td</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sh1u69" sourceRef="postProcessSDNCDelete" targetRef="ExclusiveGateway_0mys1pj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04hdt5s" name="Yes" sourceRef="ExclusiveGateway_0mys1pj" targetRef="SDNCUnassign">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("unassignSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_03bkrg4" sourceRef="DeleteAAIAR" targetRef="postProcessRequest" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1086eg7" name="Rollback SDNC?" default="SequenceFlow_0xm9g9s">
+ <bpmn2:incoming>SequenceFlow_1c07scr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xm9g9s</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_144pxkp</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_144pxkp" name="Yes" sourceRef="ExclusiveGateway_1086eg7" targetRef="UpdateAAIARPendingDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackSDNC" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lwqzlv" name="To AAI Delete">
+ <bpmn2:incoming>SequenceFlow_0xm9g9s</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="AAI Delete" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0m483td" name="No" sourceRef="ExclusiveGateway_0mys1pj" targetRef="DeleteAAIAR" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0kdn6a5" name="AAI Delete">
+ <bpmn2:outgoing>SequenceFlow_13mhe5h</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="AAI Delete" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13mhe5h" sourceRef="IntermediateCatchEvent_0kdn6a5" targetRef="DeleteAAIAR" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1txpz34" name="Skip Rollback?" default="SequenceFlow_1c07scr">
+ <bpmn2:incoming>SequenceFlow_0bfuk6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c07scr</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0oe57h4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c07scr" name="No" sourceRef="ExclusiveGateway_1txpz34" targetRef="ExclusiveGateway_1086eg7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0oe57h4" name="Yes" sourceRef="ExclusiveGateway_1txpz34" targetRef="postProcessRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0vw18rq" name="Deactiavate SDNC?&#10;" default="SequenceFlow_0dzz8fp">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fvfplx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dzz8fp</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1fvfplx" name="Yes" sourceRef="ExclusiveGateway_0vw18rq" targetRef="SDNCDeactivate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("deactivateSdnc" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dzz8fp" name="No" sourceRef="ExclusiveGateway_0vw18rq" targetRef="DeleteSDNC" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceTXCRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="66" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="433" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="160" y="370" 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="101" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="160" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131" y="397" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="966" y="646" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="984" y="687" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="198" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCDeactivate">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCDelete">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCDelete">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCUnassign">
+ <dc:Bounds x="590" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCUnassign">
+ <dc:Bounds x="590" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="640" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="724.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="690" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="739" y="770" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
+ <dc:Bounds x="-9" y="962" width="367" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="20" y="1025" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="295" y="1025" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="313" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ProcessError">
+ <dc:Bounds x="125" y="1003" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="56" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="125" y="1043" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="91" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="225" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="264" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="264" y="1043" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="1043" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="279" y="1043" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="DeleteAAIAR">
+ <dc:Bounds x="787" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="DeleteSDNC" isMarkerVisible="true">
+ <dc:Bounds x="197" y="761" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="648" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-180" y="767" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-189" y="808" width="59" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-144" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-112" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-112" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="-79" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-97" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1k13o3m_di" bpmnElement="UpdateAAIARPendingDelete">
+ <dc:Bounds x="627" y="381" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0v13nt6_di" bpmnElement="IntermediateThrowEvent_0v13nt6">
+ <dc:Bounds x="659" y="298" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="650" y="275" width="73" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g4cl5f_di" bpmnElement="SequenceFlow_0g4cl5f">
+ <di:waypoint xsi:type="dc:Point" x="677" y="381" />
+ <di:waypoint xsi:type="dc:Point" x="677" y="334" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="692" y="357.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ymy62j_di" bpmnElement="SequenceFlow_0ymy62j">
+ <di:waypoint xsi:type="dc:Point" x="887" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="966" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_197vrli_di" bpmnElement="SequenceFlow_0m483rd">
+ <di:waypoint xsi:type="dc:Point" x="222" y="761" />
+ <di:waypoint xsi:type="dc:Point" x="222" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="672" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="230" y="732.7173913043479" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ue1x4e_di" bpmnElement="SequenceFlow_0m483st">
+ <di:waypoint xsi:type="dc:Point" x="222" y="811" />
+ <di:waypoint xsi:type="dc:Point" x="222" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="358" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="481" y="796" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232.20103151493018" y="822.2200886262924" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bfuk6l_di" bpmnElement="SequenceFlow_0bfuk6l">
+ <di:waypoint xsi:type="dc:Point" x="260" y="413" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="413" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297" y="398" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xm9g9s_di" bpmnElement="SequenceFlow_0xm9g9s">
+ <di:waypoint xsi:type="dc:Point" x="495" y="386" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="334" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="477" y="353.9807135698298" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0g5bd80_di" bpmnElement="SubProcess_0g5bd80" isExpanded="true">
+ <dc:Bounds x="515" y="979" width="405" height="139" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_11nscgh_di" bpmnElement="StartEvent_11nscgh">
+ <dc:Bounds x="563" y="1036" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="1077" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0cexvpg_di" bpmnElement="ScriptTask_0cexvpg">
+ <dc:Bounds x="683" y="1014" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1ce2d7j_di" bpmnElement="EndEvent_1ce2d7j">
+ <dc:Bounds x="845" y="1036" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="863" y="1077" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ebobc7_di" bpmnElement="SequenceFlow_0ebobc7">
+ <di:waypoint xsi:type="dc:Point" x="599" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="652" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="1054" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="667" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ugqw84_di" bpmnElement="SequenceFlow_1ugqw84">
+ <di:waypoint xsi:type="dc:Point" x="783" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="1054" />
+ <di:waypoint xsi:type="dc:Point" x="845" y="1054" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="828" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_13b9eww_di" bpmnElement="postProcessRequest">
+ <dc:Bounds x="787" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0mys1pj_di" bpmnElement="ExclusiveGateway_0mys1pj" isMarkerVisible="true">
+ <dc:Bounds x="470" y="760" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="490" y="640" width="86" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sh1u69_di" bpmnElement="SequenceFlow_0sh1u69">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="452" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04hdt5s_di" bpmnElement="SequenceFlow_04hdt5s">
+ <di:waypoint xsi:type="dc:Point" x="495" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="732" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03bkrg4_di" bpmnElement="SequenceFlow_03bkrg4">
+ <di:waypoint xsi:type="dc:Point" x="837" y="742" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="704" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1086eg7_di" bpmnElement="ExclusiveGateway_1086eg7" isMarkerVisible="true">
+ <dc:Bounds x="469" y="385" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="458" y="439" width="83" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_144pxkp_di" bpmnElement="SequenceFlow_144pxkp">
+ <di:waypoint xsi:type="dc:Point" x="519" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="392.99583286074477" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0lwqzlv_di" bpmnElement="IntermediateThrowEvent_0lwqzlv">
+ <dc:Bounds x="479" y="298" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="473" y="277" width="67" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m483td_di" bpmnElement="SequenceFlow_0m483td">
+ <di:waypoint xsi:type="dc:Point" x="495" y="810" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="802" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="503.0189879790115" y="823.6755392339563" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0kdn6a5_di" bpmnElement="IntermediateCatchEvent_0kdn6a5">
+ <dc:Bounds x="819" y="876" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="916" width="53" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13mhe5h_di" bpmnElement="SequenceFlow_13mhe5h">
+ <di:waypoint xsi:type="dc:Point" x="837" y="876" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="848" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="826" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="862" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1txpz34_di" bpmnElement="ExclusiveGateway_1txpz34" isMarkerVisible="true">
+ <dc:Bounds x="334" y="385" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="370" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c07scr_di" bpmnElement="SequenceFlow_1c07scr">
+ <di:waypoint xsi:type="dc:Point" x="384" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="469" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="394.9978753852595" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oe57h4_di" bpmnElement="SequenceFlow_0oe57h4">
+ <di:waypoint xsi:type="dc:Point" x="359" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="520" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0vw18rq_di" bpmnElement="ExclusiveGateway_0vw18rq" isMarkerVisible="true">
+ <dc:Bounds x="-79" y="760" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-53" y="631" width="62" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fvfplx_di" bpmnElement="SequenceFlow_1fvfplx">
+ <di:waypoint xsi:type="dc:Point" x="-54" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="-54" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-49" y="733.3483834130782" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dzz8fp_di" bpmnElement="SequenceFlow_0dzz8fp">
+ <di:waypoint xsi:type="dc:Point" x="-54" y="810" />
+ <di:waypoint xsi:type="dc:Point" x="-54" y="892" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="892" />
+ <di:waypoint xsi:type="dc:Point" x="208" y="797" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-48.00000000000003" y="827" width="14" 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
new file mode 100644
index 0000000000..07de3fc0b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoCreateE2ENetworkInstance" name="DoCreateE2ENetworkInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1gomb9n</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_16gvaru" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1gomb9n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0s7w7gp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstance()
+dcsi.preProcessSDNCAssignRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_0dp0qqq" name="Post Process SDNC Assign Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1wtx8gj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0k06cqp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstance()
+dcsi.postProcessSDNCAssign(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_0ao684p" name="Call SDNC Adapter Service Topology Assign" calledElement="DoUnderlayVpnOperation">
+ <bpmn:extensionElements>
+ <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0s7w7gp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wtx8gj</bpmn:outgoing>
+ </bpmn:callActivity>
+ <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: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>
+ </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_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">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2ENetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16gvaru_di" bpmnElement="ScriptTask_16gvaru">
+ <dc:Bounds x="346" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0dp0qqq_di" bpmnElement="ScriptTask_0dp0qqq">
+ <dc:Bounds x="754" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ao684p_di" bpmnElement="CallActivity_0ao684p">
+ <dc:Bounds x="546" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tpifgl_di" bpmnElement="EndEvent_0tpifgl">
+ <dc:Bounds x="1432" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s7w7gp_di" bpmnElement="SequenceFlow_0s7w7gp">
+ <di:waypoint xsi:type="dc:Point" x="446" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="496" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wtx8gj_di" bpmnElement="SequenceFlow_1wtx8gj">
+ <di:waypoint xsi:type="dc:Point" x="646" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="754" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="700" y="99" width="0" height="12" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872.5" y="99" width="0" 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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gomb9n_di" bpmnElement="SequenceFlow_1gomb9n">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277.5" y="99" 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/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..a5fadcf14b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -0,0 +1,544 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateE2EServiceInstanceV3" name="DoCreateE2EServiceInstanceV3" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qiiycn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w9t6tc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstance()
+dcsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" />
+ <bpmn2: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" />
+ <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" />
+ <camunda:in source="serviceType" target="GENPS_serviceType" />
+ <camunda:in sourceExpression="service-instance" target="GENPS_type" />
+ <camunda:in source="serviceInstanceData" target="GENPS_payload" />
+ <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="GENPS_requesId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_129ih1g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="CustomE2EPutService" targetRef="ScriptTask_0q37vn9" />
+ <bpmn2:subProcess id="SubProcess_06d8lk8" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0yljq9y">
+ <bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_117lkk3">
+ <bpmn2:incoming>SequenceFlow_1xzgv5k</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_1srx6p6" name="Call DoCreateE2EServiceInstanceRollback" calledElement="DoCreateE2EServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rollbackError" target="rollbackErrror" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lqktwf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eumzpf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0eumzpf" sourceRef="CallActivity_1srx6p6" targetRef="ScriptTask_1p0vyip" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tgrn11" sourceRef="StartEvent_0yljq9y" targetRef="ScriptTask_0ocetux" />
+ <bpmn2:scriptTask id="ScriptTask_0ocetux" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0tgrn11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lqktwf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstance()
+dcsi.preProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lqktwf" sourceRef="ScriptTask_0ocetux" targetRef="CallActivity_1srx6p6" />
+ <bpmn2:scriptTask id="ScriptTask_1p0vyip" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eumzpf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xzgv5k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstance()
+dcsi.postProcessRollback(execution)
+]]></bpmn2:script>
+ </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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+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:outgoing>SequenceFlow_1qctzm0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="Task_0raqlqc" name="Init Resource Oper Status">
+ <bpmn2: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_initResOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qctzm0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13xfsff</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to Decompose_Service">
+ <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mlbhmt" name="GoTo StartService">
+ <bpmn2:incoming>SequenceFlow_012h7yx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1o01d7d" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xjwb45</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_012h7yx</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.processDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0biblpc" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qxzgvq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xjwb45</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1cllqk3" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_166w91p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qxzgvq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0tv85pg" name="Decompose_Service">
+ <bpmn2:outgoing>SequenceFlow_166w91p</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xjwb45" sourceRef="CallActivity_0biblpc" targetRef="ScriptTask_1o01d7d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qxzgvq" sourceRef="ScriptTask_1cllqk3" targetRef="CallActivity_0biblpc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_166w91p" sourceRef="IntermediateCatchEvent_0tv85pg" targetRef="ScriptTask_1cllqk3" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16okck2" name="GoTo StartPrepareResource">
+ <bpmn2:incoming>SequenceFlow_1tkgqu3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tkgqu3" sourceRef="ScriptTask_0q37vn9" targetRef="IntermediateThrowEvent_16okck2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0jrb3xu" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
+ <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_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:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.doServiceHoming(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResourcesV3">
+ <bpmn2:extensionElements>
+ <camunda:in source="nsServiceName" target="nsServiceName" />
+ <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="resourceUUID" target="resourceUUID" />
+ <camunda:in source="resourceParameters" target="resourceParameters" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="addResourceList" target="addResourceList" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0bf6bzp</bpmn2:incoming>
+ <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:outgoing>SequenceFlow_0bf6bzp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstance()
+csi.preProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1y7jr4t" name="PostProcess for Add Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0d0c20n</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a6vgsu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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_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:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceV3">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="18" y="-207" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="12" y="-166" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="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>
+ <bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
+ <di:waypoint xsi:type="dc:Point" x="813" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="911" y="94" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
+ <dc:Bounds x="15" y="865" width="783" height="195" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
+ <dc:Bounds x="111" y="942" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="983" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
+ <dc:Bounds x="744" y="942" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="983" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
+ <dc:Bounds x="409" y="920" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
+ <di:waypoint xsi:type="dc:Point" x="509" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="577" y="960" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="498" y="945" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
+ <di:waypoint xsi:type="dc:Point" x="147" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="960" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
+ <dc:Bounds x="246" y="920" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
+ <di:waypoint xsi:type="dc:Point" x="346" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="409" y="960" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="945" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
+ <dc:Bounds x="577" y="920" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
+ <di:waypoint xsi:type="dc:Point" x="677" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="960" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="960" width="90" height="0" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="524" 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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc">
+ <dc:Bounds x="604" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1290" y="-167" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1mlbhmt_di" bpmnElement="IntermediateThrowEvent_1mlbhmt">
+ <dc:Bounds x="1315" y="-57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1288" y="-16" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1o01d7d_di" bpmnElement="ScriptTask_1o01d7d">
+ <dc:Bounds x="713" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0biblpc_di" bpmnElement="CallActivity_0biblpc">
+ <dc:Bounds x="478" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1cllqk3_di" bpmnElement="ScriptTask_1cllqk3">
+ <dc:Bounds x="196" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0tv85pg_di" bpmnElement="IntermediateCatchEvent_0tv85pg">
+ <dc:Bounds x="26" y="-57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="-21" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xjwb45_di" bpmnElement="SequenceFlow_0xjwb45">
+ <di:waypoint xsi:type="dc:Point" x="578" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645.5" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qxzgvq_di" bpmnElement="SequenceFlow_0qxzgvq">
+ <di:waypoint xsi:type="dc:Point" x="296" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="387" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn">
+ <di:waypoint xsi:type="dc:Point" x="54" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="-210" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_166w91p_di" bpmnElement="SequenceFlow_166w91p">
+ <di:waypoint xsi:type="dc:Point" x="62" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_16okck2_di" bpmnElement="IntermediateThrowEvent_16okck2">
+ <dc:Bounds x="1315" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1299" y="117" width="71" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tkgqu3_di" bpmnElement="SequenceFlow_1tkgqu3">
+ <di:waypoint xsi:type="dc:Point" x="1168" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1257" y="88" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w9t6tc_di" bpmnElement="SequenceFlow_0w9t6tc">
+ <di:waypoint xsi:type="dc:Point" x="226" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="-195" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jrb3xu_di" bpmnElement="IntermediateCatchEvent_0jrb3xu">
+ <dc:Bounds x="18" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="8" y="115" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i7t9hq_di" bpmnElement="SequenceFlow_1i7t9hq">
+ <di:waypoint xsi:type="dc:Point" x="54" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="125" y="76" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
+ <dc:Bounds x="18" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="318" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_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" />
+ </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" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="706.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="971" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d0c20n_di" bpmnElement="SequenceFlow_0d0c20n">
+ <di:waypoint xsi:type="dc:Point" x="1071" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1145" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1063" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0hzmoug_di" bpmnElement="EndEvent_0hzmoug">
+ <dc:Bounds x="1315" y="282.4076655052265" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1333" y="322.4076655052265" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a6vgsu_di" bpmnElement="SequenceFlow_0a6vgsu">
+ <di:waypoint xsi:type="dc:Point" x="1245" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ <bpmndi:BPMNLabel>
+ <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:BPMNLabel>
+ <dc:Bounds x="232" 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/DoCreateE2EServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..c26ad9ae59
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceRollback.bpmn
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateE2EServiceInstanceRollback" name="DoCreateE2EServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSIRollback_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_01l4ssl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="ExclusiveGateway_19tbjgn" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="RollbackSDNC?" default="SequenceFlow_1uw2p9a">
+ <bpmn2:incoming>SequenceFlow_06aasqh</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="CallActivity_0ak0ezb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackSDNC" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBackAAI?" default="SequenceFlow_1n7wade">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1njogr1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7wade</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1x9eh33</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7wade" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05wu9i7" sourceRef="deleteSI" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x9eh33" name="yes" sourceRef="ExclusiveGateway_0ii31dq" targetRef="deleteSI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackAAI" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" name="Call SDNC Service Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivate" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0khjo7l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("sdncDeactivateResponse")
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0khjo7l" sourceRef="ScriptTask_1uxr0cx" targetRef="CallActivity_0ppz9nd" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19tbjgn" name="skip Rollback" default="SequenceFlow_06aasqh">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06aasqh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1rzlaoy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PostProcess_ScriptTask" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_05wu9i7</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1n7wade</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rzlaoy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01l4ssl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01l4ssl" sourceRef="PostProcess_ScriptTask" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06aasqh" name="no" sourceRef="ExclusiveGateway_19tbjgn" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rzlaoy" name="yes" sourceRef="ExclusiveGateway_19tbjgn" targetRef="PostProcess_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="SubProcess_11bi8mc" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1gxe17c">
+ <bpmn2:outgoing>SequenceFlow_1ch4xrf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_15yddb0" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ch4xrf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pjk2ff</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_12e3h6k">
+ <bpmn2:incoming>SequenceFlow_1pjk2ff</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ch4xrf" name="" sourceRef="StartEvent_1gxe17c" targetRef="ScriptTask_15yddb0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pjk2ff" name="" sourceRef="ScriptTask_15yddb0" targetRef="EndEvent_12e3h6k" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_1awt1ds" name="Post Process SDNC Delete">
+ <bpmn2:incoming>SequenceFlow_006g9e8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1njogr1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("sdncDeleteResponse")
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.validateSDNCResponse(execution, response, "delete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0ppz9nd" name="Call SDNC Service Topology Dekete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0khjo7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_006g9e8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_006g9e8" sourceRef="CallActivity_0ppz9nd" targetRef="ScriptTask_1awt1ds" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1njogr1" sourceRef="ScriptTask_1awt1ds" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:scriptTask id="deleteSI" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1x9eh33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05wu9i7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.deleteServiceInstance(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="234" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="234" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1208" y="350" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1226" y="391" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="508" y="323" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="576" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="594" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="869" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="612" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="680" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="647" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="334" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="366" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="350" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="448" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="129" width="79" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="498" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="100" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="473" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="473" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="72" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="751" y="-41" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
+ <dc:Bounds x="1046" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1094" y="104" width="66" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7wade_di" bpmnElement="SequenceFlow_1n7wade">
+ <di:waypoint xsi:type="dc:Point" x="1071" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="241" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="124.63709677419354" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7">
+ <di:waypoint xsi:type="dc:Point" x="1217" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1217" y="201" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="169" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x9eh33_di" bpmnElement="SequenceFlow_1x9eh33">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1167" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1126" y="82" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="639" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="671" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="539" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="671" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khjo7l_di" bpmnElement="SequenceFlow_0khjo7l">
+ <di:waypoint xsi:type="dc:Point" x="771" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="796" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true">
+ <dc:Bounds x="366" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="358" y="54" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="680" y="367" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="780" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="869" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="825" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask">
+ <dc:Bounds x="1176" y="201" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl">
+ <di:waypoint xsi:type="dc:Point" x="1226" y="281" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="350" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1241" y="315.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh">
+ <di:waypoint xsi:type="dc:Point" x="416" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="448" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="82" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy">
+ <di:waypoint xsi:type="dc:Point" x="391" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="391" y="268" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="195" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_11bi8mc_di" bpmnElement="SubProcess_11bi8mc" isExpanded="true">
+ <dc:Bounds x="325" y="576" width="419" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1gxe17c_di" bpmnElement="StartEvent_1gxe17c">
+ <dc:Bounds x="360" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="378" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15yddb0_di" bpmnElement="ScriptTask_15yddb0">
+ <dc:Bounds x="468" y="606" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_12e3h6k_di" bpmnElement="EndEvent_12e3h6k">
+ <dc:Bounds x="618" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ch4xrf_di" bpmnElement="SequenceFlow_1ch4xrf">
+ <di:waypoint xsi:type="dc:Point" x="396" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="468" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pjk2ff_di" bpmnElement="SequenceFlow_1pjk2ff">
+ <di:waypoint xsi:type="dc:Point" x="568" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="593" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1awt1ds_di" bpmnElement="ScriptTask_1awt1ds">
+ <dc:Bounds x="921" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ppz9nd_di" bpmnElement="CallActivity_0ppz9nd">
+ <dc:Bounds x="796" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_006g9e8_di" bpmnElement="SequenceFlow_006g9e8">
+ <di:waypoint xsi:type="dc:Point" x="896" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="921" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="909" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1njogr1_di" bpmnElement="SequenceFlow_1njogr1">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0uml7gl_di" bpmnElement="deleteSI">
+ <dc:Bounds x="1167" y="57" 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
new file mode 100644
index 0000000000..4c107c7cb4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
@@ -0,0 +1,1051 @@
+<?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:process id="DoCreateE2EServiceInstanceV2" name="DoCreateE2EServiceInstanceV2" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
+ <bpmn2:extensionElements>
+ <camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
+ <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" />
+ <camunda:in source="serviceType" target="GENPS_serviceType" />
+ <camunda:in sourceExpression="service-instance" target="GENPS_type" />
+ <camunda:in source="serviceInstanceData" target="GENPS_payload" />
+ <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="GENPS_requesId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0zmz5am</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_129ih1g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="CustomE2EPutService" targetRef="ScriptTask_0q37vn9_PostProcessAAIPUT" />
+ <bpmn2:subProcess id="SubProcess_06d8lk8" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0yljq9y">
+ <bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_117lkk3">
+ <bpmn2:incoming>SequenceFlow_1xzgv5k</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_1srx6p6" name="Call DoCreateE2EServiceInstanceRollback" calledElement="DoCreateE2EServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rollbackError" target="rollbackErrror" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lqktwf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eumzpf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0eumzpf" sourceRef="CallActivity_1srx6p6" targetRef="ScriptTask_1p0vyip" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tgrn11" sourceRef="StartEvent_0yljq9y" targetRef="ScriptTask_0ocetux" />
+ <bpmn2:scriptTask id="ScriptTask_0ocetux" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0tgrn11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lqktwf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstanceV2()
+dcsi.preProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lqktwf" sourceRef="ScriptTask_0ocetux" targetRef="CallActivity_1srx6p6" />
+ <bpmn2:scriptTask id="ScriptTask_1p0vyip" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eumzpf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xzgv5k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateE2EServiceInstanceV2()
+dcsi.postProcessRollback(execution)
+]]></bpmn2:script>
+ </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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_0kbbt94" />
+ <bpmn2:sequenceFlow id="SequenceFlow_03fabby" sourceRef="ScriptTask_0q37vn9_PostProcessAAIPUT" targetRef="IntermediateThrowEvent_0cabwkq" />
+ <bpmn2:scriptTask id="Task_1u82cbz" name="PreProcess Decompose Next Resouce" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13l7ffp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gorww6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.preProcessDecomposeNextResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1761epe" default="SequenceFlow_14ef6wp">
+ <bpmn2:incoming>SequenceFlow_1wf52w6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t9tmp4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_14ef6wp</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_163tmnq</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gorww6" sourceRef="Task_1u82cbz" targetRef="ScriptTask_1oc0qjo" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1t9tmp4" name="VFC" sourceRef="ExclusiveGateway_1761epe" targetRef="Task_09laxun">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("controllerType") =="VFC"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="Task_09laxun" name="PreProcess Resource Request for VFC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1t9tmp4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t4cc7w</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.preProcessResourceRequestForController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1t4cc7w" sourceRef="Task_09laxun" targetRef="ExclusiveGateway_1xkr802" />
+ <bpmn2:callActivity id="Task_1wyyy33" name="Call DoCreateVFCNetworkServiceInstance" calledElement="DoCreateVFCNetworkServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="nsServiceName" target="nsServiceName" />
+ <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="resourceUUID" target="resourceUUID" />
+ <camunda:in source="resourceParameters" target="resourceParameters" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1a1du22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p99k36</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1p99k36" sourceRef="Task_1wyyy33" targetRef="ExclusiveGateway_1iu2jb7" />
+ <bpmn2:scriptTask id="Task_0ag30bf" name="PostProcess Resource Request for VFC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cyffv0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_07q8ra0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.postProcessResourceRequestForVFC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1op29ls" name="PostProcess Resource Request for SDNC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06byir6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ylmq2b</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.postProcessResourceRequestForSDNC(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0g6otdg" name="PreProcess Resource Request for SDNC" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vey6x4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0br9juy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.preProcessResourceRequestForController(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0r4jkig">
+ <bpmn2:incoming>SequenceFlow_0ylmq2b</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_07q8ra0</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0gxsqsa</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yhd9dp</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ylmq2b" sourceRef="ScriptTask_1op29ls" targetRef="ExclusiveGateway_0r4jkig" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07q8ra0" sourceRef="Task_0ag30bf" targetRef="ExclusiveGateway_0r4jkig" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1pwgsa8" name="Resource Finish?" default="SequenceFlow_13l7ffp">
+ <bpmn2:incoming>SequenceFlow_1rhn48b</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mbrbsc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13l7ffp</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1fq4qzy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13l7ffp" name="No" sourceRef="ExclusiveGateway_1pwgsa8" targetRef="Task_1u82cbz" />
+ <bpmn2:scriptTask id="Task_0vtxtuq_QueryServiceResources" name="Query Service Resources" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1r1hl23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ct6u3o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.getServiceResources(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1t9ln4p" name="Call Sync SDNC service Create " camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn2:incoming>SequenceFlow_1vio1tn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_07pkpa0</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:serviceTask id="CallActivity_0x5g3pa" name="Call DoCreateSDNCNetworkInstance" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn2:incoming>SequenceFlow_0br9juy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06byir6</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:scriptTask id="ScriptTask_04rn9mp" name="Post Config Service Instance Creation" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cnuo36</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lkpfe2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.postConfigRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1xkr802" name="skip VFC?" default="SequenceFlow_1a1du22">
+ <bpmn2:incoming>SequenceFlow_1t4cc7w</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1a1du22</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_14jy44g</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1a1du22" name="No" sourceRef="ExclusiveGateway_1xkr802" targetRef="Task_1wyyy33" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1iu2jb7">
+ <bpmn2:incoming>SequenceFlow_1p99k36</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14jy44g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cyffv0</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cyffv0" sourceRef="ExclusiveGateway_1iu2jb7" targetRef="Task_0ag30bf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14jy44g" name="yes" sourceRef="ExclusiveGateway_1xkr802" targetRef="ExclusiveGateway_1iu2jb7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("skipVFC") == "true" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0br9juy" sourceRef="ScriptTask_0g6otdg" targetRef="CallActivity_0x5g3pa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06byir6" sourceRef="CallActivity_0x5g3pa" targetRef="ScriptTask_1op29ls" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14ef6wp" name="Other" sourceRef="ExclusiveGateway_1761epe" targetRef="Task_0zhvu4r_llllll" />
+ <bpmn2:scriptTask id="Task_0zhvu4r_llllll" name="PosOtherCotrollerType" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14ef6wp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gxsqsa</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="StartEvent_0l5bz4h_StartService" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_0zmz5am</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zmz5am" sourceRef="StartEvent_0l5bz4h_StartService" targetRef="CustomE2EPutService" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rhn48b" sourceRef="StartEvent_StartResource" targetRef="ExclusiveGateway_1pwgsa8" />
+ <bpmn2:intermediateCatchEvent id="StartEvent_StartResource" name="StartResource">
+ <bpmn2:outgoing>SequenceFlow_1rhn48b</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ct6u3o" sourceRef="Task_0vtxtuq_QueryServiceResources" targetRef="IntermediateThrowEvent_1dwg5lz" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1dwg5lz" name="GoTo StartResource">
+ <bpmn2:incoming>SequenceFlow_1ct6u3o</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rebkae" sourceRef="StartEvent_0jhv664" targetRef="ScriptTask_1wk7zcu" />
+ <bpmn2:intermediateCatchEvent id="StartEvent_0jhv664" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_1rebkae</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="EndEvent_0x8im5g">
+ <bpmn2:incoming>SequenceFlow_1lkpfe2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lkpfe2" sourceRef="ScriptTask_04rn9mp" targetRef="EndEvent_0x8im5g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1fq4qzy" name="Yes" sourceRef="ExclusiveGateway_1pwgsa8" targetRef="IntermediateThrowEvent_GoToFinishProcess">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_resourceFinish") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_GoToFinishProcess" name="GoTo FinishProcess">
+ <bpmn2:incoming>SequenceFlow_1fq4qzy</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1aszwcv_CheckResourceType" name="Check Resouce Type" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10jgs3j</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wf52w6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.checkResourceType(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wf52w6" sourceRef="ScriptTask_1aszwcv_CheckResourceType" targetRef="ExclusiveGateway_1761epe" />
+ <bpmn2:scriptTask id="ScriptTask_0jm9d9b" name="PostProcess Decompose Next Resouce" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yhd9dp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0uj9myy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateE2EServiceInstanceV2()
+csi.postProcessDecomposeNextResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1yhd9dp" sourceRef="ExclusiveGateway_0r4jkig" targetRef="ScriptTask_0jm9d9b" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0uj9myy" sourceRef="ScriptTask_0jm9d9b" targetRef="ScriptTask_1vo6y1t" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0cabwkq" name="GoTo UpdateResourceOperStatus">
+ <bpmn2:incoming>SequenceFlow_03fabby</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateResourceOperStatus" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateCatchEvent id="StartEvent_1p7w4fj" name="Update Resource Oper Status">
+ <bpmn2:outgoing>SequenceFlow_0e8oxe4</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="UpdateResourceOperStatus" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0e8oxe4" sourceRef="StartEvent_1p7w4fj" targetRef="ScriptTask_0vaaotj" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0pz2s2d">
+ <bpmn2:incoming>SequenceFlow_07pkpa0</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_01zluif</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vey6x4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vey6x4" sourceRef="ExclusiveGateway_0pz2s2d" targetRef="ScriptTask_0g6otdg" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07pkpa0" sourceRef="ServiceTask_1t9ln4p" targetRef="ExclusiveGateway_0pz2s2d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_163tmnq" name="SDNC" sourceRef="ExclusiveGateway_1761epe" targetRef="ExclusiveGateway_0k814as">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("controllerType") =="SDNC"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0k814as" name="SDNC service Create?" default="SequenceFlow_1vio1tn">
+ <bpmn2:incoming>SequenceFlow_163tmnq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01zluif</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1vio1tn</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_01zluif" name="yes" sourceRef="ExclusiveGateway_0k814as" targetRef="ExclusiveGateway_0pz2s2d">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("unit_test") == "true" || execution.getVariable("serviceSDNCCreate") == "true" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vio1tn" name="no" sourceRef="ExclusiveGateway_0k814as" targetRef="ServiceTask_1t9ln4p" />
+ <bpmn2:scriptTask id="ScriptTask_0vaaotj" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0e8oxe4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sata7n</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1jbqff7" name="Update Service Oper Status">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1sata7n</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x0jvs1</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sata7n" sourceRef="ScriptTask_0vaaotj" targetRef="ServiceTask_1jbqff7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0x0jvs1" sourceRef="ServiceTask_1jbqff7" targetRef="ScriptTask_1pwo0jp" />
+ <bpmn2:scriptTask id="ScriptTask_1wk7zcu" name="Prepare Update Service Oper Status(100%)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1rebkae</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0gr3l25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "100")
+execution.setVariable("operationStatus", "End")
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1a6cmdu" name="Update Service Oper Status">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0gr3l25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cnuo36</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gr3l25" sourceRef="ScriptTask_1wk7zcu" targetRef="ServiceTask_1a6cmdu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0cnuo36" sourceRef="ServiceTask_1a6cmdu" targetRef="ScriptTask_04rn9mp" />
+ <bpmn2:scriptTask id="ScriptTask_1vo6y1t" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0uj9myy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_037rvnb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_037rvnb" sourceRef="ScriptTask_1vo6y1t" targetRef="ServiceTask_13w9clz" />
+ <bpmn2:serviceTask id="ServiceTask_13w9clz" name="Update Service Oper Status">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_037rvnb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mbrbsc</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mbrbsc" sourceRef="ServiceTask_13w9clz" targetRef="ExclusiveGateway_1pwgsa8" />
+ <bpmn2:scriptTask id="ScriptTask_1pwo0jp" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0x0jvs1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0aylb6e</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0aylb6e" sourceRef="ScriptTask_1pwo0jp" targetRef="ServiceTask_1dqzdko" />
+ <bpmn2:serviceTask id="ServiceTask_1dqzdko" name="Init Resource Oper Status">
+ <bpmn2: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_initResOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0aylb6e</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1r1hl23</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1r1hl23" sourceRef="ServiceTask_1dqzdko" targetRef="Task_0vtxtuq_QueryServiceResources" />
+ <bpmn2:serviceTask id="ServiceTask_0uiibxn" name="Update Service Oper Status">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_01oo8ar</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10jgs3j</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10jgs3j" sourceRef="ServiceTask_0uiibxn" targetRef="ScriptTask_1aszwcv_CheckResourceType" />
+ <bpmn2:scriptTask id="ScriptTask_1oc0qjo" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gorww6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01oo8ar</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+def ddsi = new DoCreateE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01oo8ar" sourceRef="ScriptTask_1oc0qjo" targetRef="ServiceTask_0uiibxn" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceV2">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="-14" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-20" y="120" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="187" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="22" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <bpmndi:BPMNLabel>
+ <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">
+ <di:waypoint xsi:type="dc:Point" x="287" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="380.5" 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>
+ <bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
+ <di:waypoint xsi:type="dc:Point" x="664" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="745.5" y="269" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
+ <dc:Bounds x="-11" y="1751" width="783" height="195" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
+ <dc:Bounds x="85" y="1828" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="58" y="1869" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
+ <dc:Bounds x="718" y="1828" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="691" y="1869" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
+ <dc:Bounds x="383" y="1806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
+ <di:waypoint xsi:type="dc:Point" x="483" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="551" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="472" y="1831" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
+ <di:waypoint xsi:type="dc:Point" x="121" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="220" y="1846" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
+ <dc:Bounds x="220" y="1806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
+ <di:waypoint xsi:type="dc:Point" x="320" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="307" y="1831" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
+ <dc:Bounds x="551" y="1806" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
+ <di:waypoint xsi:type="dc:Point" x="651" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="1846" />
+ <di:waypoint xsi:type="dc:Point" x="718" y="1846" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="653" y="1846" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94">
+ <dc:Bounds x="-823" y="841" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-941" y="881" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_03fabby_di" bpmnElement="SequenceFlow_03fabby">
+ <di:waypoint xsi:type="dc:Point" x="1017" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1083" y="263" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1etg91s_di" bpmnElement="Task_1u82cbz">
+ <dc:Bounds x="398" y="625" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1761epe_di" bpmnElement="ExclusiveGateway_1761epe" isMarkerVisible="true">
+ <dc:Bounds x="1137" y="1189" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1117" y="1243" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gorww6_di" bpmnElement="SequenceFlow_0gorww6">
+ <di:waypoint xsi:type="dc:Point" x="498" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="580" y="665" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="494" y="644" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t9tmp4_di" bpmnElement="SequenceFlow_1t9tmp4">
+ <di:waypoint xsi:type="dc:Point" x="1162" y="1189" />
+ <di:waypoint xsi:type="dc:Point" x="1162" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="1095" y="1017" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1166" y="1097" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1azssf7_di" bpmnElement="Task_09laxun">
+ <dc:Bounds x="995" y="977" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t4cc7w_di" bpmnElement="SequenceFlow_1t4cc7w">
+ <di:waypoint xsi:type="dc:Point" x="995" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="1017" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="885.5" y="996" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1v57nb9_di" bpmnElement="Task_1wyyy33">
+ <dc:Bounds x="539" y="977" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p99k36_di" bpmnElement="SequenceFlow_1p99k36">
+ <di:waypoint xsi:type="dc:Point" x="539" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="401" y="1017" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="425" y="996" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1fj89ew_di" bpmnElement="Task_0ag30bf">
+ <dc:Bounds x="226" y="977" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1op29ls_di" bpmnElement="ScriptTask_1op29ls">
+ <dc:Bounds x="226" y="1339" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0g6otdg_di" bpmnElement="ScriptTask_0g6otdg">
+ <dc:Bounds x="643" y="1339" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0r4jkig_di" bpmnElement="ExclusiveGateway_0r4jkig" isMarkerVisible="true">
+ <dc:Bounds x="126" y="1189" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="123" y="1243" width="60" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ylmq2b_di" bpmnElement="SequenceFlow_0ylmq2b">
+ <di:waypoint xsi:type="dc:Point" x="226" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="151" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="151" y="1239" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="143.5" y="1358" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07q8ra0_di" bpmnElement="SequenceFlow_07q8ra0">
+ <di:waypoint xsi:type="dc:Point" x="226" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="151" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="151" y="1189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="143.5" y="996" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1pwgsa8_di" bpmnElement="ExclusiveGateway_1pwgsa8" isMarkerVisible="true">
+ <dc:Bounds x="212" y="640" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="194" y="694" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13l7ffp_di" bpmnElement="SequenceFlow_13l7ffp">
+ <di:waypoint xsi:type="dc:Point" x="262" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="398" y="665" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="377.03973509933775" y="644" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08hez0f_di" bpmnElement="Task_0vtxtuq_QueryServiceResources">
+ <dc:Bounds x="917" y="451" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1t9ln4p_di" bpmnElement="ServiceTask_1t9ln4p">
+ <dc:Bounds x="881" y="1339" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1asiahh_di" bpmnElement="CallActivity_0x5g3pa">
+ <dc:Bounds x="429" y="1339" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04rn9mp_di" bpmnElement="ScriptTask_04rn9mp">
+ <dc:Bounds x="539" y="1590" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1xkr802_di" bpmnElement="ExclusiveGateway_1xkr802" isMarkerVisible="true">
+ <dc:Bounds x="816" y="992" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="817" y="1051" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a1du22_di" bpmnElement="SequenceFlow_1a1du22">
+ <di:waypoint xsi:type="dc:Point" x="816" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="1017" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="721.1366906474819" y="996" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1iu2jb7_di" bpmnElement="ExclusiveGateway_1iu2jb7" isMarkerVisible="true">
+ <dc:Bounds x="351" y="992" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="1051" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cyffv0_di" bpmnElement="SequenceFlow_0cyffv0">
+ <di:waypoint xsi:type="dc:Point" x="351" y="1017" />
+ <di:waypoint xsi:type="dc:Point" x="326" y="1017" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="293.5" y="996" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14jy44g_di" bpmnElement="SequenceFlow_14jy44g">
+ <di:waypoint xsi:type="dc:Point" x="841" y="992" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="932" />
+ <di:waypoint xsi:type="dc:Point" x="376" y="932" />
+ <di:waypoint xsi:type="dc:Point" x="376" y="992" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="599.5643203883494" y="911" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0br9juy_di" bpmnElement="SequenceFlow_0br9juy">
+ <di:waypoint xsi:type="dc:Point" x="643" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="529" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="541" y="1358" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06byir6_di" bpmnElement="SequenceFlow_06byir6">
+ <di:waypoint xsi:type="dc:Point" x="429" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="326" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="332.5" y="1358" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14ef6wp_di" bpmnElement="SequenceFlow_14ef6wp">
+ <di:waypoint xsi:type="dc:Point" x="1137" y="1214" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="1214" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="874.1140567200987" y="1193" width="29" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1pcl6u1_di" bpmnElement="Task_0zhvu4r_llllll">
+ <dc:Bounds x="539" y="1174" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gxsqsa_di" bpmnElement="SequenceFlow_0gxsqsa">
+ <di:waypoint xsi:type="dc:Point" x="539" y="1214" />
+ <di:waypoint xsi:type="dc:Point" x="176" y="1214" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <dc:Bounds x="1213" y="119" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1vjqlwn_di" bpmnElement="StartEvent_0l5bz4h_StartService">
+ <dc:Bounds x="-14" y="266" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-26" y="306" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zmz5am_di" bpmnElement="SequenceFlow_0zmz5am">
+ <di:waypoint xsi:type="dc:Point" x="22" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="248" y="263" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rhn48b_di" bpmnElement="SequenceFlow_1rhn48b">
+ <di:waypoint xsi:type="dc:Point" x="22" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="237" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="237" y="640" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129.5" y="574" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jks7by_di" bpmnElement="StartEvent_StartResource">
+ <dc:Bounds x="-14" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-31" y="617" width="71" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ct6u3o_di" bpmnElement="SequenceFlow_1ct6u3o">
+ <di:waypoint xsi:type="dc:Point" x="1018" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="1085" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="1085" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1100" y="485" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0ys6800_di" bpmnElement="IntermediateThrowEvent_1dwg5lz">
+ <dc:Bounds x="1239" y="473" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1222" y="513" width="71" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rebkae_di" bpmnElement="SequenceFlow_1rebkae">
+ <di:waypoint xsi:type="dc:Point" x="40" y="1630" />
+ <di:waypoint xsi:type="dc:Point" x="148" y="1630" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="49" y="1609" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05z1jyy_di" bpmnElement="StartEvent_0jhv664">
+ <dc:Bounds x="4" y="1612" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-13" y="1652" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0x8im5g_di" bpmnElement="EndEvent_0x8im5g">
+ <dc:Bounds x="723" y="1612" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="741" y="1652" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lkpfe2_di" bpmnElement="SequenceFlow_1lkpfe2">
+ <di:waypoint xsi:type="dc:Point" x="639" y="1630" />
+ <di:waypoint xsi:type="dc:Point" x="723" y="1630" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="1609" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fq4qzy_di" bpmnElement="SequenceFlow_1fq4qzy">
+ <di:waypoint xsi:type="dc:Point" x="237" y="690" />
+ <di:waypoint xsi:type="dc:Point" x="237" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="258" y="794" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="227.12763168720514" y="735.6050882148045" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11jt9tx_di" bpmnElement="IntermediateThrowEvent_GoToFinishProcess">
+ <dc:Bounds x="258" y="776" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242" y="816" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1aszwcv_di" bpmnElement="ScriptTask_1aszwcv_CheckResourceType">
+ <dc:Bounds x="1027" y="625" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wf52w6_di" bpmnElement="SequenceFlow_1wf52w6">
+ <di:waypoint xsi:type="dc:Point" x="1127" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="1240" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="1240" y="1214" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="1214" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1210" y="933.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0jm9d9b_di" bpmnElement="ScriptTask_0jm9d9b">
+ <dc:Bounds x="-9" y="1174" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yhd9dp_di" bpmnElement="SequenceFlow_1yhd9dp">
+ <di:waypoint xsi:type="dc:Point" x="126" y="1214" />
+ <di:waypoint xsi:type="dc:Point" x="91" y="1214" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="108.5" y="1193" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uj9myy_di" bpmnElement="SequenceFlow_0uj9myy">
+ <di:waypoint xsi:type="dc:Point" x="41" y="1174" />
+ <di:waypoint xsi:type="dc:Point" x="41" y="985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="11" y="1073.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nf1193_di" bpmnElement="IntermediateThrowEvent_0cabwkq">
+ <dc:Bounds x="1239" y="266" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1219" y="306" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0v3ecwh_di" bpmnElement="StartEvent_1p7w4fj">
+ <dc:Bounds x="-14" y="473" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-38" y="513" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e8oxe4_di" bpmnElement="SequenceFlow_0e8oxe4">
+ <di:waypoint xsi:type="dc:Point" x="22" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="226" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="79" y="470" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0pz2s2d_di" bpmnElement="ExclusiveGateway_0pz2s2d" isMarkerVisible="true">
+ <dc:Bounds x="791" y="1354" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="726" y="1408" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vey6x4_di" bpmnElement="SequenceFlow_0vey6x4">
+ <di:waypoint xsi:type="dc:Point" x="791" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="743" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="1358" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07pkpa0_di" bpmnElement="SequenceFlow_07pkpa0">
+ <di:waypoint xsi:type="dc:Point" x="881" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="816" y="1358" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_163tmnq_di" bpmnElement="SequenceFlow_163tmnq">
+ <di:waypoint xsi:type="dc:Point" x="1162" y="1239" />
+ <di:waypoint xsi:type="dc:Point" x="1162" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="1070" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1171" y="1300" width="31" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0k814as_di" bpmnElement="ExclusiveGateway_0k814as" isMarkerVisible="true">
+ <dc:Bounds x="1020" y="1354" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1022" y="1410" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01zluif_di" bpmnElement="SequenceFlow_01zluif">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="1354" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="1295" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="1295" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="1354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="922" y="1274" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vio1tn_di" bpmnElement="SequenceFlow_1vio1tn">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="1379" />
+ <di:waypoint xsi:type="dc:Point" x="981" y="1379" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1001" y="1402" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0vaaotj_di" bpmnElement="ScriptTask_0vaaotj">
+ <dc:Bounds x="226" y="451" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1jbqff7_di" bpmnElement="ServiceTask_1jbqff7">
+ <dc:Bounds x="390" y="451" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sata7n_di" bpmnElement="SequenceFlow_1sata7n">
+ <di:waypoint xsi:type="dc:Point" x="326" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="313" y="470" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x0jvs1_di" bpmnElement="SequenceFlow_0x0jvs1">
+ <di:waypoint xsi:type="dc:Point" x="490" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="482" y="470" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk7zcu_di" bpmnElement="ScriptTask_1wk7zcu">
+ <dc:Bounds x="148" y="1590" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1a6cmdu_di" bpmnElement="ServiceTask_1a6cmdu">
+ <dc:Bounds x="379" y="1590" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gr3l25_di" bpmnElement="SequenceFlow_0gr3l25">
+ <di:waypoint xsi:type="dc:Point" x="248" y="1630" />
+ <di:waypoint xsi:type="dc:Point" x="379" y="1630" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="313.5" y="1609" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cnuo36_di" bpmnElement="SequenceFlow_0cnuo36">
+ <di:waypoint xsi:type="dc:Point" x="479" y="1630" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="1630" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="509" y="1609" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1vo6y1t_di" bpmnElement="ScriptTask_1vo6y1t">
+ <dc:Bounds x="-9" y="905" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_037rvnb_di" bpmnElement="SequenceFlow_037rvnb">
+ <di:waypoint xsi:type="dc:Point" x="41" y="905" />
+ <di:waypoint xsi:type="dc:Point" x="41" y="844" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="56" y="868.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_13w9clz_di" bpmnElement="ServiceTask_13w9clz">
+ <dc:Bounds x="-9" y="764" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mbrbsc_di" bpmnElement="SequenceFlow_1mbrbsc">
+ <di:waypoint xsi:type="dc:Point" x="41" y="764" />
+ <di:waypoint xsi:type="dc:Point" x="41" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="212" y="665" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="56" y="708.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1pwo0jp_di" bpmnElement="ScriptTask_1pwo0jp">
+ <dc:Bounds x="564" y="451" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aylb6e_di" bpmnElement="SequenceFlow_0aylb6e">
+ <di:waypoint xsi:type="dc:Point" x="664" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="702.5" y="470" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1dqzdko_di" bpmnElement="ServiceTask_1dqzdko">
+ <dc:Bounds x="741" y="451" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r1hl23_di" bpmnElement="SequenceFlow_1r1hl23">
+ <di:waypoint xsi:type="dc:Point" x="841" y="491" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="491" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="470" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0uiibxn_di" bpmnElement="ServiceTask_0uiibxn">
+ <dc:Bounds x="750" y="625" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10jgs3j_di" bpmnElement="SequenceFlow_10jgs3j">
+ <di:waypoint xsi:type="dc:Point" x="850" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="665" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="938.5" y="644" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1oc0qjo_di" bpmnElement="ScriptTask_1oc0qjo">
+ <dc:Bounds x="580" y="625" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01oo8ar_di" bpmnElement="SequenceFlow_01oo8ar">
+ <di:waypoint xsi:type="dc:Point" x="680" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="750" y="665" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715" y="644" 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/DoCreateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
new file mode 100644
index 0000000000..12dbfe6dde
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
@@ -0,0 +1,1363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateNetworkInstance" name="DoCreateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1n61wit</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Name Error">
+ <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:inclusiveGateway id="InclusiveGateway">
+ <bpmn2:incoming>isNetworkActiveNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" sourceRef="InclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>isNameSentNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="isSdncRpc1_ExclusiveGateway1" />
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare Assign SDNC Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc1No_SequenceFlow1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Assign Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0d93bqw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" />
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask" />
+ <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_assignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="validateCreatePONetwork_ScriptTask" name="Validate Create PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isNetworkActive_ExclusiveGateway" name="Is Network Active?" default="isNetworkActiveNo_SequenceFlow">
+ <bpmn2:incoming>isAAIQueryNameYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isNetworkActiveYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNetworkActiveNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNetworkActiveYes_SequenceFlow" name="Yes" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="ScriptTask_0p3v749">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isNetworkActiveNo_SequenceFlow" name="No" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="InclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isAAIQueryNameOk_ExclusiveGateway" name="Is Query Name&#10; Ok?&#10;" default="isAAIQueryNameNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>isAAIQueryNameNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isAAIQueryNameYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isAAIQueryNameNo_SequenceFlow" name="No" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isReturnCode404_ExclusiveGateway" />
+ <bpmn2:sequenceFlow id="isAAIQueryNameYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isNetworkActive_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isAAIqueryNameGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">
+ <bpmn2:incoming>isAAIQueryNameNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent" />
+ <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_aaiNameReturnCode" ) == "404"}
+
+]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Prepare Rollback Data" triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ScriptTask_0j3058g" />
+ <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">
+ <bpmn2:incoming>isRollbackOn_SequenceFlow_Yes</bpmn2:incoming>
+ <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isPONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isSDNCActivate_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is SDNC Topo Ok?" default="sdncOk_No_ExclusiveGateway">
+ <bpmn2:incoming>SequenceFlow_0k7y7b5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="isSdncRpc4_ExclusiveGateway4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc4No_SequenceFlow4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lndbvr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSDNCActivate_ExclusiveGateway" name="is SDNC Activate Ok?" default="SequenceFlow_12tlymf">
+ <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cly7z2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12tlymf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cly7z2" name="Yes" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="Task_1imzwi3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncActivateRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_12tlymf" name="No" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="ExclusiveGateway_1bk0tqd" />
+ <bpmn2:exclusiveGateway id="isSdncRpc4_ExclusiveGateway4" name="is not &#39;1610&#39; SNDC Call?" default="isSdncRpc4No_SequenceFlow4">
+ <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc4Yes_SequenceFlow4</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc4No_SequenceFlow4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc4Yes_SequenceFlow4" name="Yes" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="Task_0q6pzpn">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isSdncRpc4No_SequenceFlow4" name="No" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="prepareSDNCRollbackRequest_ScriptTask" />
+ <bpmn2:scriptTask id="Task_0q6pzpn" name="Prepare RSRC SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc4Yes_SequenceFlow4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bwpkkb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1kpt4kc">
+ <bpmn2:incoming>SequenceFlow_1qwubew</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_0myjg9k" name="Prepare RollbackData" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15sffxc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_096tad6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0b8j5rw" sourceRef="Task_1imzwi3" targetRef="ExclusiveGateway_1bk0tqd" />
+ <bpmn2:scriptTask id="Task_1imzwi3" name="Prepare RSRC SDNC Activate Rollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cly7z2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0b8j5rw</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1u07hp7" name="DoCreate&#10;NetworkInstanceRollback&#10;" calledElement="DoCreateNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_096tad6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vzsyrd</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0vzsyrd" sourceRef="CallActivity_1u07hp7" targetRef="ScriptTask_0w2ekuz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bwpkkb" sourceRef="Task_0q6pzpn" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0lndbvr" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="ExclusiveGateway_1qb2vwe" />
+ <bpmn2:sequenceFlow id="SequenceFlow_096tad6" sourceRef="ScriptTask_0myjg9k" targetRef="CallActivity_1u07hp7" />
+ <bpmn2:scriptTask id="ScriptTask_0w2ekuz" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0vzsyrd</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17nx822</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qwubew</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qwubew" sourceRef="ScriptTask_0w2ekuz" targetRef="EndEvent_1kpt4kc" />
+ <bpmn2:exclusiveGateway id="isRollbackOn_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_SequenceFlow_No">
+ <bpmn2:incoming>SequenceFlow_10ttvwn</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOn_SequenceFlow_Yes</bpmn2:outgoing>
+ <bpmn2:outgoing>isRollbackOn_SequenceFlow_No</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_Yes" name="Yes" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_rollbackEnabled") == true && execution.getVariable("CRENWKI_isSdncRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_No" name="No" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1qb2vwe">
+ <bpmn2:incoming>SequenceFlow_0lndbvr</bpmn2:incoming>
+ <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0bwpkkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15sffxc</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15sffxc" sourceRef="ExclusiveGateway_1qb2vwe" targetRef="ScriptTask_0myjg9k" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1bk0tqd">
+ <bpmn2:incoming>SequenceFlow_0b8j5rw</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12tlymf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k7y7b5</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k7y7b5" sourceRef="ExclusiveGateway_1bk0tqd" targetRef="sdncOk_ExclusiveGateway" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1umhuft">
+ <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isRollbackOn_SequenceFlow_No</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17nx822</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_17nx822" sourceRef="ExclusiveGateway_1umhuft" targetRef="ScriptTask_0w2ekuz" />
+ <bpmn2:scriptTask id="ScriptTask_0j3058g" name="Set Exception Flag" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10ttvwn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.setExceptionFlag(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10ttvwn" sourceRef="ScriptTask_0j3058g" targetRef="isRollbackOn_ExclusiveGateway" />
+ <bpmn2:textAnnotation id="TextAnnotation_1py1p84"> <bpmn2:text><![CDATA[  
+Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackSDNCRequest
+-rollbackActivateSDNCRequest
+-rollbackNetworkRequest
+WorkflowException
+ ]]></bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0nketgd" sourceRef="CallActivity_1u07hp7" targetRef="TextAnnotation_1py1p84" />
+ <bpmn2:textAnnotation id="TextAnnotation_0wjpv6r"> <bpmn2:text>PO Network Rollback is created in validation.</bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0eolbkz" sourceRef="ExclusiveGateway_1bk0tqd" targetRef="TextAnnotation_0wjpv6r" />
+ </bpmn2:subProcess>
+ <bpmn2:serviceTask id="callCreateNetwork_ServiceTask" name="Call Create Network">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${CRENWKI_createNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CRENWKI_networkReturnCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CRENWKI_createNetworkResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callCreateNetwork_ServiceTask" targetRef="validateCreatePONetwork_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="callRESTReQueryNetworkID_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTReQueryNetworkID_ScriptTask" name="Call REST ReQuery Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQueryNetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ipz2ze</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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: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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareCreateNetworkRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callCreateNetwork_ServiceTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n61wit" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_preprocess" />
+ <bpmn2:scriptTask id="ScriptTask_preprocess" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1n61wit</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ftylq3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+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:outgoing>isNameSentYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNameSentNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNameSentYes_SequenceFlow" name="Yes" sourceRef="isNameSent_ExclusiveGateway" targetRef="callAAIQuery_scriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_networkName") != ""}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isNameSentNo_SequenceFlow" name="No" sourceRef="isNameSent_ExclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:callActivity id="Task_1ipbwbj" name="Call SDNC RSRC Activate&#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncActivateReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13deudk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08qibb9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_1rd6dg6" name="Prepare SDNC RSRC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc2Yes_SequenceFlow2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13deudk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0n0ptg6" name="is SDNC PRC&#10;Activate Ok?&#10;" default="SequenceFlow_18ybfu5">
+ <bpmn2:incoming>SequenceFlow_1t03rs2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jia57e</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_18ybfu5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13deudk" sourceRef="Task_1rd6dg6" targetRef="Task_1ipbwbj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08qibb9" sourceRef="Task_1ipbwbj" targetRef="validateSDNCActivate_Task" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1t03rs2" sourceRef="validateSDNCActivate_Task" targetRef="ExclusiveGateway_0n0ptg6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1jia57e" name="Yes" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="Task_0zzobg6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_18ybfu5" name="No" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="EndEvent_13v46cq" />
+ <bpmn2:scriptTask id="validateSDNCActivate_Task" name="Validate SDNCRSRC Activate&#10;Response&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_08qibb9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1t03rs2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:boundaryEvent id="BoundaryEvent_0vb26bm" attachedToRef="validateSDNCActivate_Task">
+ <bpmn2:outgoing>SequenceFlow_0s51ns0</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0s51ns0" sourceRef="BoundaryEvent_0vb26bm" targetRef="EndEvent_13v46cq" />
+ <bpmn2:endEvent id="EndEvent_13v46cq" name="SNDC Activate &#10;Error&#10;">
+ <bpmn2:incoming>SequenceFlow_18ybfu5</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0s51ns0</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="isSdncRpc1_ExclusiveGateway1" name="is not &#39;1610&#39; SNDC Call?" default="isSdncRpc1No_SequenceFlow1">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc1No_SequenceFlow1</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc1Yes_SequenceFlow1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc1No_SequenceFlow1" name="No" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="prepareSDNCTopoRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="isSdncRpc1Yes_SequenceFlow1" name="Yes" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="Task_10lubzj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0pbtywn" name="Call SDNC RSRC Assign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="CRENWKI_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKI_assignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j8bxnb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0d93bqw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0j8bxnb" sourceRef="Task_10lubzj" targetRef="Task_0pbtywn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0d93bqw" sourceRef="Task_0pbtywn" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:exclusiveGateway id="isSdncRpc2_ExclusiveGateway2" name="is not &#39;1610&#39; SNDC Call?" default="isSdncRpc2No_SequenceFlow2">
+ <bpmn2:incoming>SequenceFlow_1ipz2ze</bpmn2:incoming>
+ <bpmn2:outgoing>isSdncRpc2Yes_SequenceFlow2</bpmn2:outgoing>
+ <bpmn2:outgoing>isSdncRpc2No_SequenceFlow2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isSdncRpc2Yes_SequenceFlow2" name="Yes" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_1rd6dg6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isSdncRpc2No_SequenceFlow2" name="No" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_0zzobg6" />
+ <bpmn2:scriptTask id="Task_10lubzj" name="Prepare Assign SDNC RPC Request" scriptFormat="groovy">
+ <bpmn2:incoming>isSdncRpc1Yes_SequenceFlow1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j8bxnb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.prepareRpcSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1te02c4">
+ <bpmn2:incoming>SequenceFlow_1s8b1m1</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_0ti2ctu" name="Silent Success">
+ <bpmn2:incoming>SequenceFlow_18ylufb</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s8b1m1" sourceRef="Task_0zzobg6" targetRef="EndEvent_1te02c4" />
+ <bpmn2:scriptTask id="Task_0zzobg6" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1jia57e</bpmn2:incoming>
+ <bpmn2:incoming>isSdncRpc2No_SequenceFlow2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s8b1m1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ipz2ze" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="isSdncRpc2_ExclusiveGateway2" />
+ <bpmn2:scriptTask id="ScriptTask_0p3v749" name="Post Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18ylufb</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18ylufb" sourceRef="ScriptTask_0p3v749" targetRef="EndEvent_0ti2ctu" />
+ <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" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
+ <dc:Bounds x="397" y="177" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="390" y="218" width="49" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds x="926" y="-31" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryNameOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1098" y="-16" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1085" y="-56" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_62">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="8" />
+ <di:waypoint xsi:type="dc:Point" x="1098" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1062" y="-6.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateCreatePONetwork_ScriptTask">
+ <dc:Bounds x="1457" y="1258" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="isAAIQueryNameNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="91" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1131" y="39.0514827586207" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="isAAIQueryNameYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_73">
+ <di:waypoint xsi:type="dc:Point" x="1148" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1151" y="14.164179104477611" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1098" y="91" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1026" y="110" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
+ <di:waypoint xsi:type="dc:Point" x="1123" y="141" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1132" y="138.4109225063519" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_4">
+ <di:waypoint xsi:type="dc:Point" x="1148" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="116" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1151" y="118.55844155844156" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
+ <dc:Bounds x="1105" y="187" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1085" y="228" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callCreateNetwork_ServiceTask">
+ <dc:Bounds x="1454" y="1135" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="1590" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="31" y="608" width="1266" height="686" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="107" y="1166" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="1207" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1615" y="520" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1606" y="580" width="67" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1665" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1739" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1670" y="545.8651480742376" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_133">
+ <di:waypoint xsi:type="dc:Point" x="1615" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1554" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1587" y="549.9992641545633" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1739" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1727" y="576" width="59" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
+ <dc:Bounds x="1590" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="235" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="255.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="356" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="375.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50">
+ <di:waypoint xsi:type="dc:Point" x="143" y="1184" />
+ <di:waypoint xsi:type="dc:Point" x="170" y="1184" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="157" y="1169" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1590" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1640" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="1640" y="520" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1655" y="498" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_73" bpmnElement="isNetworkActive_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1224" y="-16" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1221" y="-57" width="56" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="isNetworkActiveYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73">
+ <di:waypoint xsi:type="dc:Point" x="1274" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1335" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1275" y="14.380425096632202" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="isNetworkActiveNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_InclusiveGateway_4">
+ <di:waypoint xsi:type="dc:Point" x="1249" y="34" />
+ <di:waypoint xsi:type="dc:Point" x="1249" y="91" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1258" y="37.520779498373976" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_4" targetElement="_BPMNShape_ScriptTask_245">
+ <di:waypoint xsi:type="dc:Point" x="1249" y="141" />
+ <di:waypoint xsi:type="dc:Point" x="1249" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1264" y="208.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_4" bpmnElement="InclusiveGateway">
+ <dc:Bounds x="1224" y="91" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1306" y="86" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
+ <dc:Bounds x="1454" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQueryNetworkID_ScriptTask">
+ <dc:Bounds x="1454" y="1392" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
+ <dc:Bounds x="1454" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1472" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1538" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="1505" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
+ <dc:Bounds x="1454" y="627" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="750" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="727" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="627" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="606" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1215" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1520" y="1237" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1454" y="1009" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1089" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1135" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="1111" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
+ <dc:Bounds x="1454" y="750" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_333">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="830" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="854.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="304" y="1060" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="248" y="1078" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="354" y="1085" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="1085" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="1159" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="351" y="1088" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="329" y="1060" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1003" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="339" y="1051" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="527" y="845" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="858" width="72" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">
+ <di:waypoint xsi:type="dc:Point" x="552" y="845" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="776" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="776" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="559" y="829" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217">
+ <di:waypoint xsi:type="dc:Point" x="551" y="894" />
+ <di:waypoint xsi:type="dc:Point" x="551" y="978" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="978" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="559" y="895" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="1199" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1299" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="1337" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1318" y="301" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
+ <dc:Bounds x="1672" y="457" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1690" y="493" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1702" y="488" />
+ <di:waypoint xsi:type="dc:Point" x="1745" y="533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1724" y="495.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
+ <dc:Bounds x="886" y="830" width="100" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1507" y="1338" />
+ <di:waypoint xsi:type="dc:Point" x="1505" y="1392" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1506" y="1350" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="21" y="381" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="54" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="499" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="169" y="436" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="330" y="458" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="348" y="499" width="0" 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="90" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="476" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="476" width="6" height="6" />
+ </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="269" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="476" />
+ <bpmndi:BPMNLabel>
+ <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">
+ <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="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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
+ <dc:Bounds x="1454" y="879" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="1504" y="959" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
+ <di:waypoint xsi:type="dc:Point" x="1504" y="1009" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="981" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n61wit_di" bpmnElement="SequenceFlow_1n61wit">
+ <di:waypoint xsi:type="dc:Point" x="433" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="195" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="507" y="195" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1jay2gg_di" bpmnElement="ScriptTask_preprocess">
+ <dc:Bounds x="546" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ftylq3_di" bpmnElement="SequenceFlow_0ftylq3">
+ <di:waypoint xsi:type="dc:Point" x="646" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="706" y="195" />
+ <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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0lw40k5_di" bpmnElement="isNameSent_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="951" y="291" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="933" y="349" width="85" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0635hhm_di" bpmnElement="isNameSentYes_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="976" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="170" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="49" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="988" y="275" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sirjgc_di" bpmnElement="isNameSentNo_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1001" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="1199" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1005" y="328" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1uxa4p9_di" bpmnElement="Task_1ipbwbj">
+ <dc:Bounds x="1014" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0m5hrmn_di" bpmnElement="Task_1rd6dg6">
+ <dc:Bounds x="1183" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0n0ptg6_di" bpmnElement="ExclusiveGateway_0n0ptg6" isMarkerVisible="true">
+ <dc:Bounds x="724" y="1553" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="1566" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13deudk_di" bpmnElement="SequenceFlow_13deudk">
+ <di:waypoint xsi:type="dc:Point" x="1183" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1114" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1149" y="1563" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08qibb9_di" bpmnElement="SequenceFlow_08qibb9">
+ <di:waypoint xsi:type="dc:Point" x="1014" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="953" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="984" y="1563" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t03rs2_di" bpmnElement="SequenceFlow_1t03rs2">
+ <di:waypoint xsi:type="dc:Point" x="853" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="814" y="1563" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jia57e_di" bpmnElement="SequenceFlow_1jia57e">
+ <di:waypoint xsi:type="dc:Point" x="749" y="1553" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="1484" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="757" y="1537.7047949008065" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18ybfu5_di" bpmnElement="SequenceFlow_18ybfu5">
+ <di:waypoint xsi:type="dc:Point" x="749" y="1603" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="1669" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="758" y="1603.7606668519034" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1v458g5_di" bpmnElement="validateSDNCActivate_Task">
+ <dc:Bounds x="853" y="1538" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0pg57au_di" bpmnElement="BoundaryEvent_0vb26bm">
+ <dc:Bounds x="859" y="1600" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="877" y="1636" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s51ns0_di" bpmnElement="SequenceFlow_0s51ns0">
+ <di:waypoint xsi:type="dc:Point" x="877" y="1636" />
+ <di:waypoint xsi:type="dc:Point" x="877" y="1687" />
+ <di:waypoint xsi:type="dc:Point" x="767" y="1687" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="892" y="1661.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0h7h49p_di" bpmnElement="EndEvent_13v46cq">
+ <dc:Bounds x="731" y="1669" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="711" y="1715" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f9d94i_di" bpmnElement="isSDNCActivate_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="304" y="953" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="210" y="966" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cly7z2_di" bpmnElement="SequenceFlow_0cly7z2">
+ <di:waypoint xsi:type="dc:Point" x="329" y="953" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="910" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="335" y="937" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12tlymf_di" bpmnElement="SequenceFlow_12tlymf">
+ <di:waypoint xsi:type="dc:Point" x="354" y="978" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="978" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="895" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="350" y="988" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ts3ph0_di" bpmnElement="isSdncRpc1_ExclusiveGateway1" isMarkerVisible="true">
+ <dc:Bounds x="1337.228" y="291" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1401" y="304" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r5sja0_di" bpmnElement="isSdncRpc1No_SequenceFlow1">
+ <di:waypoint xsi:type="dc:Point" x="1362" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="1362" y="195" />
+ <di:waypoint xsi:type="dc:Point" x="1590" y="195" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1371" y="273" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ow57qy_di" bpmnElement="isSdncRpc1Yes_SequenceFlow1">
+ <di:waypoint xsi:type="dc:Point" x="1362" y="341" />
+ <di:waypoint xsi:type="dc:Point" x="1362" y="395" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1373" y="341" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_067czgj_di" bpmnElement="Task_0pbtywn">
+ <dc:Bounds x="1454" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j8bxnb_di" bpmnElement="SequenceFlow_0j8bxnb">
+ <di:waypoint xsi:type="dc:Point" x="1412" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="1454" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1433" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d93bqw_di" bpmnElement="SequenceFlow_0d93bqw">
+ <di:waypoint xsi:type="dc:Point" x="1554" y="435" />
+ <di:waypoint xsi:type="dc:Point" x="1590" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1572" y="420" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_00dh41t_di" bpmnElement="isSdncRpc4_ExclusiveGateway4" isMarkerVisible="true">
+ <dc:Bounds x="713" y="751" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="714" y="710" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0suu90e_di" bpmnElement="isSdncRpc4Yes_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="738" y="801" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="830" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="743" y="800" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xnyl6e_di" bpmnElement="isSdncRpc4No_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="763" y="776" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="776" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="830" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="755" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gghe34_di" bpmnElement="isSdncRpc2_ExclusiveGateway2" isMarkerVisible="true">
+ <dc:Bounds x="1360" y="1553" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1343" y="1619" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lphs99_di" bpmnElement="isSdncRpc2Yes_SequenceFlow2">
+ <di:waypoint xsi:type="dc:Point" x="1360" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1283" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1337" y="1580.0388981849903" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lk1uut_di" bpmnElement="isSdncRpc2No_SequenceFlow2">
+ <di:waypoint xsi:type="dc:Point" x="1385" y="1553" />
+ <di:waypoint xsi:type="dc:Point" x="1385" y="1444" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="1444" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1362" y="1543.660178848007" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1lkq0a3_di" bpmnElement="Task_10lubzj">
+ <dc:Bounds x="1312" y="395" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_19o9l99_di" bpmnElement="Task_0q6pzpn">
+ <dc:Bounds x="688" y="830" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1te02c4_di" bpmnElement="EndEvent_1te02c4">
+ <dc:Bounds x="467" y="1426" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="1462" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1kpt4kc_di" bpmnElement="EndEvent_1kpt4kc">
+ <dc:Bounds x="1160" y="1075" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1179" y="1111" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ti2ctu_di" bpmnElement="EndEvent_0ti2ctu">
+ <dc:Bounds x="1486" y="-9" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1468" y="38" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s8b1m1_di" bpmnElement="SequenceFlow_1s8b1m1">
+ <di:waypoint xsi:type="dc:Point" x="699" y="1444" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="1444" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="1444" />
+ <di:waypoint xsi:type="dc:Point" x="503" y="1444" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="612" y="1444" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1feo4ms_di" bpmnElement="Task_0zzobg6">
+ <dc:Bounds x="699" y="1404" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0myjg9k_di" bpmnElement="ScriptTask_0myjg9k">
+ <dc:Bounds x="688" y="1053" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b8j5rw_di" bpmnElement="SequenceFlow_0b8j5rw">
+ <di:waypoint xsi:type="dc:Point" x="379" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="432" y="870" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="855" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17adm0m_di" bpmnElement="Task_1imzwi3">
+ <dc:Bounds x="279" y="830" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ipz2ze_di" bpmnElement="SequenceFlow_1ipz2ze">
+ <di:waypoint xsi:type="dc:Point" x="1454" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1432" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1432" y="1578" />
+ <di:waypoint xsi:type="dc:Point" x="1410" y="1578" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1447" y="1578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1u07hp7_di" bpmnElement="CallActivity_1u07hp7">
+ <dc:Bounds x="841" y="1053" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vzsyrd_di" bpmnElement="SequenceFlow_0vzsyrd">
+ <di:waypoint xsi:type="dc:Point" x="941" y="1093" />
+ <di:waypoint xsi:type="dc:Point" x="1007" y="1093" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="974" y="1078" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bwpkkb_di" bpmnElement="SequenceFlow_0bwpkkb">
+ <di:waypoint xsi:type="dc:Point" x="738" y="910" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="953" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="753" y="922" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lndbvr_di" bpmnElement="SequenceFlow_0lndbvr">
+ <di:waypoint xsi:type="dc:Point" x="936" y="909" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="978" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="978" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951" y="944" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_096tad6_di" bpmnElement="SequenceFlow_096tad6">
+ <di:waypoint xsi:type="dc:Point" x="788" y="1093" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="1093" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="815" y="1078" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_1py1p84_di" bpmnElement="TextAnnotation_1py1p84">
+ <dc:Bounds x="1036" y="901" width="252" height="119" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0nketgd_di" bpmnElement="Association_0nketgd">
+ <di:waypoint xsi:type="dc:Point" x="941" y="1069" />
+ <di:waypoint xsi:type="dc:Point" x="1041" y="1020" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w2ekuz_di" bpmnElement="ScriptTask_0w2ekuz">
+ <dc:Bounds x="1007" y="1053" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qwubew_di" bpmnElement="SequenceFlow_1qwubew">
+ <di:waypoint xsi:type="dc:Point" x="1107" y="1093" />
+ <di:waypoint xsi:type="dc:Point" x="1160" y="1093" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="1068" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1r7vhm5_di" bpmnElement="isRollbackOn_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="304" y="1159" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="290" y="1209" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19kcbiw_di" bpmnElement="isRollbackOn_SequenceFlow_Yes">
+ <di:waypoint xsi:type="dc:Point" x="329" y="1159" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1110" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="337" y="1142" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pl3e54_di" bpmnElement="isRollbackOn_SequenceFlow_No">
+ <di:waypoint xsi:type="dc:Point" x="354" y="1184" />
+ <di:waypoint xsi:type="dc:Point" x="432" y="1184" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="355" y="1190" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0zl5xa8_di" bpmnElement="ExclusiveGateway_1qb2vwe">
+ <dc:Bounds x="713" y="953" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="738" y="1003" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15sffxc_di" bpmnElement="SequenceFlow_15sffxc">
+ <di:waypoint xsi:type="dc:Point" x="738" y="1003" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1053" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="753" y="1028" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0t3i8it_di" bpmnElement="ExclusiveGateway_1bk0tqd">
+ <dc:Bounds x="432" y="845" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="457" y="895" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k7y7b5_di" bpmnElement="SequenceFlow_0k7y7b5">
+ <di:waypoint xsi:type="dc:Point" x="482" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="870" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="845" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0p3v749_di" bpmnElement="ScriptTask_0p3v749">
+ <dc:Bounds x="1335" y="-31" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18ylufb_di" bpmnElement="SequenceFlow_18ylufb">
+ <di:waypoint xsi:type="dc:Point" x="1435" y="9" />
+ <di:waypoint xsi:type="dc:Point" x="1486" y="9" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1461" y="-6" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_1eochiz_di" bpmnElement="ExclusiveGateway_1umhuft">
+ <dc:Bounds x="432" y="1159" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="457" y="1209" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17nx822_di" bpmnElement="SequenceFlow_17nx822">
+ <di:waypoint xsi:type="dc:Point" x="482" y="1184" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="1184" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="1133" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="1169" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_1orb6o6_di" bpmnElement="TextAnnotation_1orb6o6">
+ <dc:Bounds x="1606" y="1241" width="233" height="37" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0c315jr_di" bpmnElement="Association_0c315jr">
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1289" />
+ <di:waypoint xsi:type="dc:Point" x="1621" y="1278" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_0wjpv6r_di" bpmnElement="TextAnnotation_0wjpv6r">
+ <dc:Bounds x="341" y="735" width="180" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0eolbkz_di" bpmnElement="Association_0eolbkz">
+ <di:waypoint xsi:type="dc:Point" x="452" y="850" />
+ <di:waypoint xsi:type="dc:Point" x="435" y="771" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0j3058g_di" bpmnElement="ScriptTask_0j3058g">
+ <dc:Bounds x="170" y="1144" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10ttvwn_di" bpmnElement="SequenceFlow_10ttvwn">
+ <di:waypoint xsi:type="dc:Point" x="270" y="1184" />
+ <di:waypoint xsi:type="dc:Point" x="304" y="1184" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="287" y="1159" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..6a4861b9a4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn
@@ -0,0 +1,517 @@
+<?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.4.0">
+ <bpmn:process id="DoCreateNetworkInstanceRollback" name="DoCreateNetworkInstanceRollback" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0p5zgdb" />
+ <bpmn:callActivity id="CallActivity_1x88fsq" name="Call RSRC SDNC Deactivate Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackActivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackActivateSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackActivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1mxbdps</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07s5r14</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="CallActivity_0kbwa1x" name="Call Unassign RSRC SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0mw0dgd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rrutp3</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0p5zgdb" name="is RPC Activate Rollback?" default="SequenceFlow_1bb7zpp">
+ <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bb7zpp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1mxbdps</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0v0en47" name="is PO Network Rollback?" default="SequenceFlow_1lteduj">
+ <bpmn:incoming>SequenceFlow_1bb7zpp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_07s5r14</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0e1uixp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1lteduj</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:callActivity id="CallActivity_1xilevb" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="CRENWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="CRENWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="CRENWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_101y57s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0790olb</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_17g4q5c" name="is RSRC SDNC?" default="SequenceFlow_101y57s">
+ <bpmn:incoming>SequenceFlow_0virkpu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_101y57s</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0mw0dgd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0qc4v9t</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0el8yzs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yto4gz</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1n5jck8" name="is SDNC Rollback?" default="SequenceFlow_0qc4v9t">
+ <bpmn:incoming>SequenceFlow_1lteduj</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_17o4w67</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0virkpu</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0qc4v9t</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1bb7zpp" name="No" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="ExclusiveGateway_0v0en47" />
+ <bpmn:sequenceFlow id="SequenceFlow_1mxbdps" name="Yes" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="CallActivity_1x88fsq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackActivateSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1uixp" name="Yes" sourceRef="ExclusiveGateway_0v0en47" targetRef="ServiceTask_0bqh5yl">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_07s5r14" sourceRef="CallActivity_1x88fsq" targetRef="ExclusiveGateway_0v0en47" />
+ <bpmn:sequenceFlow id="SequenceFlow_1lteduj" name="No" sourceRef="ExclusiveGateway_0v0en47" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_0virkpu" name="Yes" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ExclusiveGateway_17g4q5c">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_17o4w67" sourceRef="ServiceTask_0bqh5yl" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_101y57s" name="No" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_1xilevb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0mw0dgd" name="Yes" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_0kbwa1x">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_1fvr7ad">
+ <bpmn:incoming>SequenceFlow_0yto4gz</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0qc4v9t" name="No" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0790olb" sourceRef="CallActivity_1xilevb" targetRef="ExclusiveGateway_0b9kbop" />
+ <bpmn:sequenceFlow id="SequenceFlow_1rrutp3" sourceRef="CallActivity_0kbwa1x" targetRef="ExclusiveGateway_0b9kbop" />
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_1" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_0b9kbop">
+ <bpmn:incoming>SequenceFlow_1rrutp3</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0790olb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0el8yzs</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0el8yzs" sourceRef="ExclusiveGateway_0b9kbop" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yto4gz" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" />
+ <bpmn:subProcess id="SubProcess_0y6ppiy" triggeredByEvent="true">
+ <bpmn:endEvent id="EndEvent_1aqh7ih">
+ <bpmn:incoming>SequenceFlow_0lomcvn</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="Task_07i164j" name="Catch Exception" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0q0te67</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0lomcvn</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("workflowException", execution.getVariable("WorkflowException")
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0q0te67" sourceRef="StartEvent_1p75ok8" targetRef="Task_07i164j" />
+ <bpmn:sequenceFlow id="SequenceFlow_0lomcvn" sourceRef="Task_07i164j" targetRef="EndEvent_1aqh7ih" />
+ <bpmn:startEvent id="StartEvent_1p75ok8">
+ <bpmn:outgoing>SequenceFlow_0q0te67</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:startEvent>
+ </bpmn:subProcess>
+ <bpmn:boundaryEvent id="BoundaryEvent_0dnnott" attachedToRef="CallActivity_1x88fsq">
+ <bpmn:outgoing>SequenceFlow_0ctlrql</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0ctlrql" sourceRef="BoundaryEvent_0dnnott" targetRef="EndEvent_0n9y395" />
+ <bpmn:endEvent id="EndEvent_0n9y395">
+ <bpmn:incoming>SequenceFlow_0ctlrql</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1yj6513" attachedToRef="CallActivity_0kbwa1x">
+ <bpmn:outgoing>SequenceFlow_1j55a94</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1y8kgef" attachedToRef="CallActivity_1xilevb">
+ <bpmn:outgoing>SequenceFlow_1yn24xq</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:endEvent id="EndEvent_05tcxw3">
+ <bpmn:incoming>SequenceFlow_1j55a94</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1yn24xq</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1j55a94" sourceRef="BoundaryEvent_1yj6513" targetRef="EndEvent_05tcxw3" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yn24xq" sourceRef="BoundaryEvent_1y8kgef" targetRef="EndEvent_05tcxw3" />
+ <bpmn:scriptTask id="ServiceTask_0bqh5yl" name="Call Rollback Network" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0e1uixp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17o4w67</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+DoCreateNetworkInstanceRollback.callPONetworkAdapter(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackSDNCRequest
+-rollbackActivateSDNCRequest
+-rollbackNetworkRequest
+WorkflowException
+ 
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" />
+ <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for:
+WorkflowException
+rolledBack
+wasDeleted
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" />
+ </bpmn:process>
+ <bpmn:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateNetworkInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="214" y="240" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1">
+ <dc:Bounds x="333" y="218" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg">
+ <di:waypoint xsi:type="dc:Point" x="250" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="333" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="292" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2">
+ <di:waypoint xsi:type="dc:Point" x="433" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1x88fsq_di" bpmnElement="CallActivity_1x88fsq">
+ <dc:Bounds x="506" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kbwa1x_di" bpmnElement="CallActivity_0kbwa1x">
+ <dc:Bounds x="972" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0p5zgdb_di" bpmnElement="ExclusiveGateway_0p5zgdb" isMarkerVisible="true">
+ <dc:Bounds x="531" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="360" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0v0en47_di" bpmnElement="ExclusiveGateway_0v0en47" isMarkerVisible="true">
+ <dc:Bounds x="697" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685" y="312" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15">
+ <dc:Bounds x="112" y="355" width="277" height="115" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal">
+ <di:waypoint xsi:type="dc:Point" x="349" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="355" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1xilevb_di" bpmnElement="CallActivity_1xilevb">
+ <dc:Bounds x="972" y="608" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_17g4q5c_di" bpmnElement="ExclusiveGateway_17g4q5c" isMarkerVisible="true">
+ <dc:Bounds x="879" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="914" y="460" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu">
+ <dc:Bounds x="1123" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1n5jck8_di" bpmnElement="ExclusiveGateway_1n5jck8" isMarkerVisible="true">
+ <dc:Bounds x="879" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="308" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82">
+ <dc:Bounds x="1287" y="410" width="165" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b">
+ <di:waypoint xsi:type="dc:Point" x="1223" y="389" />
+ <di:waypoint xsi:type="dc:Point" x="1287" y="412" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bb7zpp_di" bpmnElement="SequenceFlow_1bb7zpp">
+ <di:waypoint xsi:type="dc:Point" x="581" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="697" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="349.27450980392155" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mxbdps_di" bpmnElement="SequenceFlow_1mxbdps">
+ <di:waypoint xsi:type="dc:Point" x="556" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="397.10731155015196" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1uixp_di" bpmnElement="SequenceFlow_0e1uixp">
+ <di:waypoint xsi:type="dc:Point" x="722" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="722" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="730" y="395" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07s5r14_di" bpmnElement="SequenceFlow_07s5r14">
+ <di:waypoint xsi:type="dc:Point" x="606" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="697" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lteduj_di" bpmnElement="SequenceFlow_1lteduj">
+ <di:waypoint xsi:type="dc:Point" x="747" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="750" y="350.14631933618307" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0virkpu_di" bpmnElement="SequenceFlow_0virkpu">
+ <di:waypoint xsi:type="dc:Point" x="904" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="496" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="914" y="392.7469456247061" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17o4w67_di" bpmnElement="SequenceFlow_17o4w67">
+ <di:waypoint xsi:type="dc:Point" x="772" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_101y57s_di" bpmnElement="SequenceFlow_101y57s">
+ <di:waypoint xsi:type="dc:Point" x="904" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="544" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mw0dgd_di" bpmnElement="SequenceFlow_0mw0dgd">
+ <di:waypoint xsi:type="dc:Point" x="929" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="930" y="498" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad">
+ <dc:Bounds x="1278" y="255" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1296" y="291" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qc4v9t_di" bpmnElement="SequenceFlow_0qc4v9t">
+ <di:waypoint xsi:type="dc:Point" x="929" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="351.1191898360114" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0790olb_di" bpmnElement="SequenceFlow_0790olb">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1123" y="633" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rrutp3_di" bpmnElement="SequenceFlow_1rrutp3">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1148" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1110" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="-6" y="665" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="142" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="27" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="303" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="63" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="142" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="242" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0dot6c9_di" bpmnElement="ExclusiveGateway_0b9kbop">
+ <dc:Bounds x="1148" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0el8yzs_di" bpmnElement="SequenceFlow_0el8yzs">
+ <di:waypoint xsi:type="dc:Point" x="1173" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="444" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yto4gz_di" bpmnElement="SequenceFlow_0yto4gz">
+ <di:waypoint xsi:type="dc:Point" x="1173" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1278" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="302.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1laq87i_di" bpmnElement="SubProcess_0y6ppiy" isExpanded="true">
+ <dc:Bounds x="2" y="886" width="382" height="213" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1aqh7ih_di" bpmnElement="EndEvent_1aqh7ih">
+ <dc:Bounds x="305" y="964" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="1000" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0gg2fk5_di" bpmnElement="Task_07i164j">
+ <dc:Bounds x="132" y="942" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q0te67_di" bpmnElement="SequenceFlow_0q0te67">
+ <di:waypoint xsi:type="dc:Point" x="68" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="132" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="100" y="967" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lomcvn_di" bpmnElement="SequenceFlow_0lomcvn">
+ <di:waypoint xsi:type="dc:Point" x="232" y="982" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="982" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="957" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_0i4ili6_di" bpmnElement="BoundaryEvent_0dnnott">
+ <dc:Bounds x="588" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ctlrql_di" bpmnElement="SequenceFlow_0ctlrql">
+ <di:waypoint xsi:type="dc:Point" x="612" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="631" y="622" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="622" y="584.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ra7y1s_di" bpmnElement="EndEvent_0n9y395">
+ <dc:Bounds x="621" y="620" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="656" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0a7qaw9_di" bpmnElement="StartEvent_1p75ok8">
+ <dc:Bounds x="32" y="964" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="50" y="1000" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_13arr8o_di" bpmnElement="BoundaryEvent_1yj6513">
+ <dc:Bounds x="1054" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0qs2m90_di" bpmnElement="BoundaryEvent_1y8kgef">
+ <dc:Bounds x="1054" y="590" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tnenxe_di" bpmnElement="EndEvent_05tcxw3">
+ <dc:Bounds x="1116" y="573" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="609" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j55a94_di" bpmnElement="SequenceFlow_1j55a94">
+ <di:waypoint xsi:type="dc:Point" x="1088" y="569" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="584" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1103" y="561.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yn24xq_di" bpmnElement="SequenceFlow_1yn24xq">
+ <di:waypoint xsi:type="dc:Point" x="1088" y="599" />
+ <di:waypoint xsi:type="dc:Point" x="1116" y="591" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1102" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0c5jqhn_di" bpmnElement="ServiceTask_0bqh5yl">
+ <dc:Bounds x="672" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateResources.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateResources.bpmn
new file mode 100644
index 0000000000..dc2cf9b676
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateResources.bpmn
@@ -0,0 +1,370 @@
+<?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:process id="DoCreateResourcesV3" name="DoCreateResourcesV3" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qiiycn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w9t6tc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateResources()
+dcsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1xdjlzm" name="Post Config Service Instance Creation" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16nxl6h</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0epxs3b</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateResources()
+csi.postConfigRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn2:incoming>SequenceFlow_0k0f7lm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11f2zuu</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11f2zuu" sourceRef="Task_0io5qby" targetRef="IntermediateThrowEvent_0f2w7aj" />
+ <bpmn2:scriptTask id="ScriptTask_1y0los4" name="Sequence Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1hbesp9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13d9g1n</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.sequenceResoure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13d9g1n" sourceRef="ScriptTask_1y0los4" targetRef="ExclusiveGateway_07rr3wp" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?" default="SequenceFlow_0q6uy30">
+ <bpmn2:incoming>SequenceFlow_1jenxlp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q6uy30</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16nxl6h</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr" />
+ <bpmn2:scriptTask id="ScriptTask_0y4u2ty" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13c7bhn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jenxlp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.parseNextResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jenxlp" sourceRef="ScriptTask_0y4u2ty" targetRef="ExclusiveGateway_0n9y4du" />
+ <bpmn2:scriptTask id="ScriptTask_0l4nkqr" name="Get Current Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0q6uy30</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1qozd66</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0uiygod</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.getCurrentResoure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed" default="SequenceFlow_18wj44x">
+ <bpmn2:incoming>SequenceFlow_13d9g1n</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18wj44x</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1vprtt9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj" />
+ <bpmn2:scriptTask id="Task_0qlkmvt" name="Prepare resource recipe Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0uiygod</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1u9k0dm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.executeResourceRecipe(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to StratPrepareService">
+ <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0f2w7aj" name="GoTo ResourceLoop">
+ <bpmn2:incoming>SequenceFlow_18wj44x</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_11f2zuu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vprtt9" name="yes" sourceRef="ExclusiveGateway_07rr3wp" targetRef="Task_1blaq0f">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
+ <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="ScriptTask_1y0los4" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_02bah5m" name="ResourceLoop">
+ <bpmn2:outgoing>SequenceFlow_1qozd66</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16nxl6h" name="yes" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_1xdjlzm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0uiygod" sourceRef="ScriptTask_0l4nkqr" targetRef="Task_0qlkmvt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1u9k0dm" sourceRef="Task_0qlkmvt" targetRef="Task_12ghoph" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13c7bhn" sourceRef="Task_12ghoph" targetRef="ScriptTask_0y4u2ty" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qozd66" sourceRef="IntermediateCatchEvent_02bah5m" targetRef="ScriptTask_0l4nkqr" />
+ <bpmn2:endEvent id="EndEvent_1ddg1di">
+ <bpmn2:incoming>SequenceFlow_0epxs3b</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0epxs3b" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_1ddg1di" />
+ <bpmn2:subProcess id="SubProcess_0sfdqc1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_0x7o2ug">
+ <bpmn2:outgoing>SequenceFlow_0gr9xqj</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0lgdyyb">
+ <bpmn2:incoming>SequenceFlow_0a6l29p</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1648adp" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gr9xqj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a6l29p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gr9xqj" name="" sourceRef="StartEvent_0x7o2ug" targetRef="ScriptTask_1648adp" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a6l29p" name="" sourceRef="ScriptTask_1648adp" targetRef="EndEvent_0lgdyyb" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="Task_1blaq0f" name="Prepare SDNC service Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1vprtt9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k0f7lm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateResources()
+ddsi.prepareServiceTopologyRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k0f7lm" sourceRef="Task_1blaq0f" targetRef="Task_0io5qby" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateResourcesV3">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="18" y="-207" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="12" y="-166" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="126" y="-229" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm">
+ <dc:Bounds x="1119" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby">
+ <dc:Bounds x="1047" y="353" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11f2zuu_di" bpmnElement="SequenceFlow_11f2zuu">
+ <di:waypoint xsi:type="dc:Point" x="1147" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1219" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1219" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1189" y="340.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1y0los4_di" bpmnElement="ScriptTask_1y0los4">
+ <dc:Bounds x="444" y="260" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13d9g1n_di" bpmnElement="SequenceFlow_13d9g1n">
+ <di:waypoint xsi:type="dc:Point" x="544" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="603.5" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true">
+ <dc:Bounds x="929" y="500" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="911" y="454" width="85" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30">
+ <di:waypoint xsi:type="dc:Point" x="954" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="954" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="593" y="670" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty">
+ <dc:Bounds x="728" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jenxlp_di" bpmnElement="SequenceFlow_1jenxlp">
+ <di:waypoint xsi:type="dc:Point" x="828" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="929" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="833.5" y="504" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0l4nkqr_di" bpmnElement="ScriptTask_0l4nkqr">
+ <dc:Bounds x="196" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true">
+ <dc:Bounds x="753" y="275" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="734" y="243" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x">
+ <di:waypoint xsi:type="dc:Point" x="803" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="831" y="294" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u88n0f_di" bpmnElement="Task_0qlkmvt">
+ <dc:Bounds x="357" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1y17r20_di" bpmnElement="Task_12ghoph">
+ <dc:Bounds x="551" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11saqvj_di" bpmnElement="IntermediateThrowEvent_0bq4fxs">
+ <dc:Bounds x="1315" y="-207" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1292" y="-167" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn">
+ <di:waypoint xsi:type="dc:Point" x="54" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="-210" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w9t6tc_di" bpmnElement="SequenceFlow_0w9t6tc">
+ <di:waypoint xsi:type="dc:Point" x="226" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="-195" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0f2w7aj_di" bpmnElement="IntermediateThrowEvent_0f2w7aj">
+ <dc:Bounds x="1315" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1299" y="323" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vprtt9_di" bpmnElement="SequenceFlow_1vprtt9">
+ <di:waypoint xsi:type="dc:Point" x="778" y="325" />
+ <di:waypoint xsi:type="dc:Point" x="778" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="861" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784" y="353" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
+ <dc:Bounds x="18" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="318" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hbesp9_di" bpmnElement="SequenceFlow_1hbesp9">
+ <di:waypoint xsi:type="dc:Point" x="54" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="444" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_02bah5m_di" bpmnElement="IntermediateCatchEvent_02bah5m">
+ <dc:Bounds x="18" y="507" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="543" width="73" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16nxl6h_di" bpmnElement="SequenceFlow_16nxl6h">
+ <di:waypoint xsi:type="dc:Point" x="979" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1119" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1040" y="504" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uiygod_di" bpmnElement="SequenceFlow_0uiygod">
+ <di:waypoint xsi:type="dc:Point" x="296" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326.5" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1u9k0dm_di" bpmnElement="SequenceFlow_1u9k0dm">
+ <di:waypoint xsi:type="dc:Point" x="457" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="551" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13c7bhn_di" bpmnElement="SequenceFlow_13c7bhn">
+ <di:waypoint xsi:type="dc:Point" x="651" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689.5" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qozd66_di" bpmnElement="SequenceFlow_1qozd66">
+ <di:waypoint xsi:type="dc:Point" x="54" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="125" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ddg1di_di" bpmnElement="EndEvent_1ddg1di">
+ <dc:Bounds x="1314.8151147098515" y="506.9419703103914" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1332.8151147098515" y="546.9419703103914" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0epxs3b_di" bpmnElement="SequenceFlow_0epxs3b">
+ <di:waypoint xsi:type="dc:Point" x="1219" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1267" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0sfdqc1_di" bpmnElement="SubProcess_0sfdqc1" isExpanded="true">
+ <dc:Bounds x="338" y="817" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0x7o2ug_di" bpmnElement="StartEvent_0x7o2ug">
+ <dc:Bounds x="407" y="885" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="335" y="926" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0lgdyyb_di" bpmnElement="EndEvent_0lgdyyb">
+ <dc:Bounds x="700" y="885" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="628" y="926" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1648adp_di" bpmnElement="ScriptTask_1648adp">
+ <dc:Bounds x="511" y="863" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gr9xqj_di" bpmnElement="SequenceFlow_0gr9xqj">
+ <di:waypoint xsi:type="dc:Point" x="443" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="511" y="903" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="387" y="888" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a6l29p_di" bpmnElement="SequenceFlow_0a6l29p">
+ <di:waypoint xsi:type="dc:Point" x="611" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="700" y="903" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="567.5" y="888" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0dh2mj1_di" bpmnElement="Task_1blaq0f">
+ <dc:Bounds x="861" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k0f7lm_di" bpmnElement="SequenceFlow_0k0f7lm">
+ <di:waypoint xsi:type="dc:Point" x="961" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1047" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1004" y="372.5" 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/DoCreateServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
new file mode 100644
index 0000000000..29116a67fc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -0,0 +1,515 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="getAAICustomerById_scriptTask" name="Get AAI Customer By globalCustomerId " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.getAAICustomerById(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="Post Process SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterServiceTopologyAssign" name="Call SDNC Adapter Service Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_01q6pl4</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:callActivity id="callGenericPutService" name="Call Generic Put Service" calledElement="GenericPutService">
+ <bpmn2:extensionElements>
+ <camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
+ <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENPS_serviceType" />
+ <camunda:in sourceExpression="service-instance" target="GENPS_type" />
+ <camunda:in source="serviceInstanceData" target="GENPS_payload" />
+ <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" />
+ <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: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>
+ <bpmn2:errorEventDefinition errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_117lkk3">
+ <bpmn2:incoming>SequenceFlow_1xzgv5k</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallActivity_1srx6p6" name="Call DoCreateServiceInstanceRollback" calledElement="DoCreateServiceInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rollbackError" target="rollbackErrror" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lqktwf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eumzpf</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0eumzpf" sourceRef="CallActivity_1srx6p6" targetRef="ScriptTask_1p0vyip" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tgrn11" sourceRef="StartEvent_0yljq9y" targetRef="ScriptTask_0ocetux" />
+ <bpmn2:scriptTask id="ScriptTask_0ocetux" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0tgrn11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lqktwf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.preProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1lqktwf" sourceRef="ScriptTask_0ocetux" targetRef="CallActivity_1srx6p6" />
+ <bpmn2:scriptTask id="ScriptTask_1p0vyip" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eumzpf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xzgv5k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.postProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nk6aol" name="sdncVersion is 1610 and not port mirror?" default="SequenceFlow_156ih25">
+ <bpmn2:incoming>SequenceFlow_0w5i6vf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_156ih25</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_00v4npo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_156ih25" name="no" sourceRef="ExclusiveGateway_1nk6aol" targetRef="PreProcessSDNCAssignRequest" />
+ <bpmn2:endEvent id="EndEvent_10659gr">
+ <bpmn2:incoming>SequenceFlow_00v4npo</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateServiceInstance()
+ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k0wn03" sourceRef="Task_0wj9ajs" targetRef="Task_1g8wthf" />
+ <bpmn2:scriptTask id="Task_0wj9ajs" name="Create Project" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16sdyz9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k0wn03</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.createProject(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_1g8wthf" name="Create Owning Entity" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k0wn03</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w5i6vf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.createOwningEntity(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jhzmzn" sourceRef="callGenericPutService" targetRef="ScriptTask_0q37vn9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w5i6vf" sourceRef="Task_1g8wthf" targetRef="ExclusiveGateway_1nk6aol" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16sdyz9" sourceRef="ScriptTask_0q37vn9" targetRef="Task_0wj9ajs" />
+ <bpmn2:subProcess id="SubProcess_1awd8cm" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1thtxi5" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0x48any</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_052o4xc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateServiceInstance()
+dcsi.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="StartEvent_0xjnqhv">
+ <bpmn2:outgoing>SequenceFlow_0x48any</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0eikrc1">
+ <bpmn2:incoming>SequenceFlow_052o4xc</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0x48any" name="" sourceRef="StartEvent_0xjnqhv" targetRef="ScriptTask_1thtxi5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_052o4xc" name="" sourceRef="ScriptTask_1thtxi5" targetRef="EndEvent_0eikrc1" />
+ </bpmn2:subProcess>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="152" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="147" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="245" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="188" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="245" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="217" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="getAAICustomerById_scriptTask">
+ <dc:Bounds x="393" y="57" width="100" height="80" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="529" y="82" width="0" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1095" y="1338" 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>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="972" y="1054" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_74" bpmnElement="CallSDNCAdapterServiceTopologyAssign">
+ <dc:Bounds x="972" y="930" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_62">
+ <di:waypoint xsi:type="dc:Point" x="345" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="369" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_334" targetElement="_BPMNShape_CallActivity_74">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="930" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="990" y="910" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_74" targetElement="_BPMNShape_ScriptTask_335">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="1010" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="1054" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="992" y="1032" width="90" height="0" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="1148" 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>
+ <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
+ <dc:Bounds x="195" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="213" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
+ <dc:Bounds x="828" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="846" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
+ <dc:Bounds x="493" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
+ <di:waypoint xsi:type="dc:Point" x="593" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="661" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="627" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
+ <di:waypoint xsi:type="dc:Point" x="231" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nk6aol_di" bpmnElement="ExclusiveGateway_1nk6aol" isMarkerVisible="true">
+ <dc:Bounds x="997" y="717" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="729" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_156ih25_di" bpmnElement="SequenceFlow_156ih25">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="767" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="810" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="770" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_10659gr_di" bpmnElement="EndEvent_10659gr">
+ <dc:Bounds x="1105" y="724" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1078" y="765" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_00v4npo_di" bpmnElement="SequenceFlow_00v4npo">
+ <di:waypoint xsi:type="dc:Point" x="1047" y="742" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="742" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="742" />
+ <di:waypoint xsi:type="dc:Point" x="1105" y="742" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
+ <di:waypoint xsi:type="dc:Point" x="430" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
+ <dc:Bounds x="661" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
+ <di:waypoint xsi:type="dc:Point" x="761" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="626" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k0wn03_di" bpmnElement="SequenceFlow_0k0wn03">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="541" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="589" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="992" y="559" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0v8y3ex_di" bpmnElement="Task_0wj9ajs">
+ <dc:Bounds x="972" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0lndrbk_di" bpmnElement="Task_1g8wthf">
+ <dc:Bounds x="972" y="589" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jhzmzn_di" bpmnElement="SequenceFlow_1jhzmzn">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="336" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="305" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w5i6vf_di" bpmnElement="SequenceFlow_0w5i6vf">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="669" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="717" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="687" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16sdyz9_di" bpmnElement="SequenceFlow_16sdyz9">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="416" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="461" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="432.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1awd8cm_di" bpmnElement="SubProcess_1awd8cm" isExpanded="true">
+ <dc:Bounds x="98" y="304" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1thtxi5_di" bpmnElement="ScriptTask_1thtxi5">
+ <dc:Bounds x="246" y="359" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0xjnqhv_di" bpmnElement="StartEvent_0xjnqhv">
+ <dc:Bounds x="131" y="381" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="149" y="422" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0eikrc1_di" bpmnElement="EndEvent_0eikrc1">
+ <dc:Bounds x="407" y="381" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="425" y="422" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x48any_di" bpmnElement="SequenceFlow_0x48any">
+ <di:waypoint xsi:type="dc:Point" x="167" y="399" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="399" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="399" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_052o4xc_di" bpmnElement="SequenceFlow_052o4xc">
+ <di:waypoint xsi:type="dc:Point" x="346" y="399" />
+ <di:waypoint xsi:type="dc:Point" x="407" y="399" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="381" y="399" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..eb3e35f6fe
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateServiceInstanceRollback" name="DoCreateServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSIRollback_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateServiceInstanceRollback()
+rbk.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_01l4ssl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="ExclusiveGateway_19tbjgn" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="RollbackSDNC?" default="SequenceFlow_1uw2p9a">
+ <bpmn2:incoming>SequenceFlow_06aasqh</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="CallActivity_0ak0ezb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackSDNC" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBackAAI?" default="SequenceFlow_1n7wade">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1njogr1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7wade</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1x9eh33</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7wade" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" name="Call SDNC Service Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivate" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0khjo7l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("sdncDeactivateResponse")
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0khjo7l" sourceRef="ScriptTask_1uxr0cx" targetRef="CallActivity_0ppz9nd" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19tbjgn" name="skip Rollback" default="SequenceFlow_06aasqh">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06aasqh</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1rzlaoy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PostProcess_ScriptTask" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1n7wade</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1rzlaoy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0h3wkj4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01l4ssl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01l4ssl" sourceRef="PostProcess_ScriptTask" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06aasqh" name="no" sourceRef="ExclusiveGateway_19tbjgn" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rzlaoy" name="yes" sourceRef="ExclusiveGateway_19tbjgn" targetRef="PostProcess_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="SubProcess_11bi8mc" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1gxe17c">
+ <bpmn2:outgoing>SequenceFlow_1ch4xrf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_15yddb0" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ch4xrf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pjk2ff</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_12e3h6k">
+ <bpmn2:incoming>SequenceFlow_1pjk2ff</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ch4xrf" name="" sourceRef="StartEvent_1gxe17c" targetRef="ScriptTask_15yddb0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pjk2ff" name="" sourceRef="ScriptTask_15yddb0" targetRef="EndEvent_12e3h6k" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_1awt1ds" name="Post Process SDNC Delete">
+ <bpmn2:incoming>SequenceFlow_006g9e8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1njogr1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("sdncDeleteResponse")
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.validateSDNCResponse(execution, response, "delete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0ppz9nd" name="Call SDNC Service Topology Dekete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0khjo7l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_006g9e8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_006g9e8" sourceRef="CallActivity_0ppz9nd" targetRef="ScriptTask_1awt1ds" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1njogr1" sourceRef="ScriptTask_1awt1ds" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:serviceTask id="Task_06o1aio" name="AAI Delete Service" camunda:class="org.onap.so.bpmn.infrastructure.aai.AAIDeleteServiceInstance">
+ <bpmn2:incoming>SequenceFlow_1x9eh33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0h3wkj4</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0h3wkj4" sourceRef="Task_06o1aio" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x9eh33" name="yes" sourceRef="ExclusiveGateway_0ii31dq" targetRef="Task_06o1aio">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rollbackAAI" ) == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="234" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="234" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1208" y="350" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1226" y="391" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="508" y="323" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="576" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="594" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="869" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="612" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="680" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="647" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="334" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="366" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="350" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="448" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="129" width="79" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="498" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="100" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="473" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="473" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="72" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="751" y="-41" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
+ <dc:Bounds x="1046" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1094" y="104" width="66" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7wade_di" bpmnElement="SequenceFlow_1n7wade">
+ <di:waypoint xsi:type="dc:Point" x="1071" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="241" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="124.63709677419354" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="639" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="671" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="539" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="671" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khjo7l_di" bpmnElement="SequenceFlow_0khjo7l">
+ <di:waypoint xsi:type="dc:Point" x="771" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="796" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true">
+ <dc:Bounds x="366" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="358" y="54" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="680" y="367" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="780" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="869" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="825" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask">
+ <dc:Bounds x="1176" y="201" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl">
+ <di:waypoint xsi:type="dc:Point" x="1226" y="281" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="350" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1241" y="315.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh">
+ <di:waypoint xsi:type="dc:Point" x="416" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="448" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="82" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy">
+ <di:waypoint xsi:type="dc:Point" x="391" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="391" y="268" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="195" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_11bi8mc_di" bpmnElement="SubProcess_11bi8mc" isExpanded="true">
+ <dc:Bounds x="325" y="576" width="419" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1gxe17c_di" bpmnElement="StartEvent_1gxe17c">
+ <dc:Bounds x="360" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="378" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15yddb0_di" bpmnElement="ScriptTask_15yddb0">
+ <dc:Bounds x="468" y="606" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_12e3h6k_di" bpmnElement="EndEvent_12e3h6k">
+ <dc:Bounds x="618" y="628" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="669" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ch4xrf_di" bpmnElement="SequenceFlow_1ch4xrf">
+ <di:waypoint xsi:type="dc:Point" x="396" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="468" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="421" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pjk2ff_di" bpmnElement="SequenceFlow_1pjk2ff">
+ <di:waypoint xsi:type="dc:Point" x="568" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="646" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="593" y="646" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1awt1ds_di" bpmnElement="ScriptTask_1awt1ds">
+ <dc:Bounds x="921" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ppz9nd_di" bpmnElement="CallActivity_0ppz9nd">
+ <dc:Bounds x="796" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_006g9e8_di" bpmnElement="SequenceFlow_006g9e8">
+ <di:waypoint xsi:type="dc:Point" x="896" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="921" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="909" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1njogr1_di" bpmnElement="SequenceFlow_1njogr1">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0e780gv_di" bpmnElement="Task_06o1aio">
+ <dc:Bounds x="1176" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h3wkj4_di" bpmnElement="SequenceFlow_0h3wkj4">
+ <di:waypoint xsi:type="dc:Point" x="1276" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1296" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1296" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1276" y="241" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1311" y="163" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x9eh33_di" bpmnElement="SequenceFlow_1x9eh33">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1136" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1136" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1115.9718309859154" y="71" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
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
new file mode 100644
index 0000000000..88a99c2938
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollbackV2.bpmn
@@ -0,0 +1,103 @@
+<?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
new file mode 100644
index 0000000000..e8dbc8c7f6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceV2.bpmn
@@ -0,0 +1,197 @@
+<?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/DoCreateVFCNetworkServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVFCNetworkServiceInstance.bpmn
new file mode 100644
index 0000000000..c151370698
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVFCNetworkServiceInstance.bpmn
@@ -0,0 +1,261 @@
+<?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.10.0">
+ <bpmn:process id="DoCreateVFCNetworkServiceInstance" name="DoCreateVFCNetworkServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_09nzhwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_1uiz85h" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_0zfksms" />
+ <bpmn:scriptTask id="Task_09nzhwk" name="Create Network Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1uiz85h</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.createNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="instantiate_NSTask" name="Instantiate Network Service" scriptFormat="groovy">
+ <bpmn:incoming>createNSSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ywe21t</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.instantiateNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0zfksms" name="Create NS Success?">
+ <bpmn:incoming>SequenceFlow_1uiz85h</bpmn:incoming>
+ <bpmn:outgoing>createNSSuccess_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>createNSFailed_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="createNSSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_0zfksms" targetRef="instantiate_NSTask">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("nsInstanceName" ) != null && execution.getVariable("nsInstanceName" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="createNSFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_0zfksms" targetRef="createNSFailed_EndEvent">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("nsInstanceName" ) == null || execution.getVariable("nsInstanceName" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1is7zys" name="Instantiate NS Success?">
+ <bpmn:incoming>SequenceFlow_1ywe21t</bpmn:incoming>
+ <bpmn:outgoing>instantiateFailed_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>instantiateSuccess_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1ywe21t" sourceRef="instantiate_NSTask" targetRef="ExclusiveGateway_1is7zys" />
+ <bpmn:sequenceFlow id="instantiateFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_1is7zys" targetRef="EndEvent_1gkvvpn">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) == null || execution.getVariable("jobId" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="instantiateSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_1is7zys" targetRef="queryJob_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) != null && execution.getVariable("jobId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_15492gl" name="Instantiate Finished?">
+ <bpmn:incoming>SequenceFlow_0xqo13p</bpmn:incoming>
+ <bpmn:outgoing>operationFinished_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>operationProcessing_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="operationFinished_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_15492gl" targetRef="finishNSCreate_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) != "processing" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="operationProcessing_SequenceFlow" name="no" sourceRef="ExclusiveGateway_15492gl" targetRef="timeDelay_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) == "processing" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0cq2q6g" sourceRef="finishNSCreate_Task" targetRef="EndEvent_1x6k78c" />
+ <bpmn:endEvent id="createNSFailed_EndEvent" name="createNSFailed">
+ <bpmn:incoming>createNSFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1gkvvpn">
+ <bpmn:incoming>instantiateFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1x6k78c">
+ <bpmn:incoming>SequenceFlow_0cq2q6g</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="queryJob_Task" name="Query NS Progress" scriptFormat="groovy">
+ <bpmn:incoming>instantiateSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1gsbpxj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xqo13p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.queryNSProgress(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="finishNSCreate_Task" name="Finish NS Create">
+ <bpmn:incoming>operationFinished_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0cq2q6g</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.finishNSCreate(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0xqo13p" sourceRef="queryJob_Task" targetRef="ExclusiveGateway_15492gl" />
+ <bpmn:scriptTask id="timeDelay_Task" name="timeDelay" scriptFormat="groovy">
+ <bpmn:incoming>operationProcessing_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1gsbpxj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.timeDelay(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1gsbpxj" sourceRef="timeDelay_Task" targetRef="queryJob_Task" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVFCNetworkServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
+ <dc:Bounds x="175" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="152" y="147" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <di:waypoint xsi:type="dc:Point" x="211" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="251" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="251" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="266" y="123" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+ <di:waypoint xsi:type="dc:Point" x="393" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="479" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="436" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uiz85h_di" bpmnElement="SequenceFlow_1uiz85h">
+ <di:waypoint xsi:type="dc:Point" x="579" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="631" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk">
+ <dc:Bounds x="479" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="293" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="instantiate_NSTask">
+ <dc:Bounds x="839" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0zfksms_di" bpmnElement="ExclusiveGateway_0zfksms" isMarkerVisible="true">
+ <dc:Bounds x="683" y="104" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="685" y="158" width="52" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rt03zl_di" bpmnElement="createNSSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="733" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="839" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="108" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0df541u_di" bpmnElement="createNSFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="708" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="717" y="63" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1is7zys_di" bpmnElement="ExclusiveGateway_1is7zys" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="105" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="159" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ywe21t_di" bpmnElement="SequenceFlow_1ywe21t">
+ <di:waypoint xsi:type="dc:Point" x="939" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="1034" y="130" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986.5" y="108.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j7xo94_di" bpmnElement="instantiateFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="105" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1068" y="63" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ui2n9l_di" bpmnElement="instantiateSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="271" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="207" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_15492gl_di" bpmnElement="ExclusiveGateway_15492gl" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="570" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1038" y="624" width="50" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hftgi6_di" bpmnElement="operationFinished_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="909" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="909" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="783" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="963" y="574" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0omec46_di" bpmnElement="operationProcessing_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1131" y="607" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cq2q6g_di" bpmnElement="SequenceFlow_0cq2q6g">
+ <di:waypoint xsi:type="dc:Point" x="683" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="556.5" y="574" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ido9wi_di" bpmnElement="createNSFailed_EndEvent">
+ <dc:Bounds x="690" y="-3" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="37" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0xgvlmx_di" bpmnElement="EndEvent_1gkvvpn">
+ <dc:Bounds x="1041" y="-3" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1014" y="37" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="484" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="617" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sxy5we_di" bpmnElement="queryJob_Task">
+ <dc:Bounds x="1009" y="271" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSCreate_Task">
+ <dc:Bounds x="683" y="555" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xqo13p_di" bpmnElement="SequenceFlow_0xqo13p">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1074" y="454.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0rb5agx_di" bpmnElement="timeDelay_Task">
+ <dc:Bounds x="1162" y="406" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gsbpxj_di" bpmnElement="SequenceFlow_1gsbpxj">
+ <di:waypoint xsi:type="dc:Point" x="1212" y="406" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="311" />
+ <di:waypoint xsi:type="dc:Point" x="1109" y="311" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1227" y="352.5" 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/subprocess/DoCreateVfModule.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModule.bpmn
new file mode 100644
index 0000000000..820d1174be
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModule.bpmn
@@ -0,0 +1,1701 @@
+<?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="_pNTO8MRhEeWv36YLr7PC3Q" 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="DoCreateVfModule" name="DoCreateVfModule" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="DoCreateVfModule">
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_26" name="DoCreateVfModule" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateCatchEvent_1" targetRef="IsVolumeGroupIdSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupIdSpecified" name="Is volume_group_id specified?" default="SequenceFlow_11">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="no" sourceRef="IsVolumeGroupIdSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeGroupTenant" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DCVFM_tenantId" target="tenantId" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ConfirmVolumeGroupTenant" targetRef="IsVolumeGroupNameSpecified" />
+ <bpmn2:exclusiveGateway id="IsVolumeGroupNameSpecified" name="Is volume_group_name specified?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="IsVolumeGroupNameSpecified" targetRef="ConfirmVolumeName">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_volumeGroupName") != null && execution.getVariable("DCVFM_volumeGroupName") != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="IsVolumeGroupNameSpecified" targetRef="ExclusiveGateway_4" />
+ <bpmn2:callActivity id="ConfirmVolumeName" name="Confirm Volume Group Name" calledElement="ConfirmVolumeGroupName">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="ConfirmVolumeGroupName_volumeGroupId" />
+ <camunda:in source="DCVFM_volumeGroupName" target="ConfirmVolumeGroupName_volumeGroupName" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="ConfirmVolumeGroupName_aicCloudRegion" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_confirmResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ConfirmVolumeName" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_4" targetRef="CreateAAIVfModule" />
+ <bpmn2:callActivity id="CallSDNCAdapterVDModuleTopologyAssign" name="Call SDNC Adapter: VF Module Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_assignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nh92s8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterVDModuleTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="CallSDNCAdapterVDModuleTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0p61zug</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0aegg0r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution, "vfmodule")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyGET" name="Call SDNC Adapter: VF Module Topology GET" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_getSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVFModuleTopologyGET" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="CallSDNCAdapterVFModuleTopologyGET" targetRef="PostProcessSDNCGetRequest" />
+ <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_getSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIVfModule_1" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PreProcessUpdateAAIVfModule_1" name="PreProcess Update AAIVfModule" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1avfxsz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestOrch(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyActivate" name="Call SDNC Adapter: VF Module Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_activateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+ String response = execution.getVariable("DCVFM_activateSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Is volume_group_id specified?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessUpdateAAIVfModule_1" targetRef="UpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="UpdateAAIVfModule_1" targetRef="PreProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PreProcessSDNCActivateRequest" targetRef="CallSDNCAdapterVFModuleTopologyActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="CallSDNCAdapterVFModuleTopologyActivate" targetRef="PostProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PostProcessSDNCActivateRequest" targetRef="ExclusiveGateway_5" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="UpdateAndActivate">
+ <bpmn2:outgoing>SequenceFlow_0363dz7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_30" name="UpdateAndActivate" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_2" name="Provision">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_29" name="Provision" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="IntermediateCatchEvent_2" targetRef="PreProcessSDNCAssignRequest" />
+ <bpmn2:scriptTask id="PrepareCreateAAIVfModuleVolumeGroupRequest" name="Prepare CreateAAIVfModuleVolumeGroup Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepareCreateAAIVfModuleVolumeGroupRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" calledElement="CreateAAIVfModuleVolumeGroup">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createAAIVfModuleVolumeGroupRequest" target="CreateAAIVfModuleVolumeGroupRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateAAIVfModuleVolumeGroup" targetRef="ExclusiveGateway_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PrepareCreateAAIVfModuleVolumeGroupRequest" targetRef="CreateAAIVfModuleVolumeGroup" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_setSuccess" />
+ <bpmn2:scriptTask id="PreProcessVNFAdapterRequest" name="PreProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallVNFAdapterVFModuleCreate" name="Call VNF Adapter to create VF Module" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_createVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DCVFM_createVnfAResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in variables="all" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNF Adapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ushk1d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="To UpdateAndActivate">
+ <bpmn2:incoming>SequenceFlow_0xfanpi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0abffyj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_31" name="UpdateAndActivate" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="PostProcessSDNCGetRequest" targetRef="PreProcessVNFAdapterRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="PreProcessVNFAdapterRequest" targetRef="CallVNFAdapterVFModuleCreate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="CallVNFAdapterVFModuleCreate" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="To Provision">
+ <bpmn2:incoming>SequenceFlow_0zcfn2x</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_170kw7h</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_28" name="Provision" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Need to query SDNC for VNF Topology?" default="SequenceFlow_0zcfn2x">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zcfn2x</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0m382su</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PostProcessCreateAAIVfModule" name="PostProcess CreateAAIVfModule" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessCreateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="PostProcessCreateAAIVfModule" targetRef="IsBaseVfModule" />
+ <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_36">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_2" />
+ <bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.setSuccessIndicator(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_8" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="QueryCloudRegion" name="Query Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.queryCloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_40" name="yes" sourceRef="IsVolumeGroupIdSpecified" targetRef="QueryCloudRegion">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_volumeGroupId") != null && execution.getVariable("DCVFM_volumeGroupId") != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_19933zh" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To DoCreateVfModule">
+ <bpmn2:incoming>SequenceFlow_1f53tby</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0270n5c</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_25" name="DoCreateVfModule" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:callActivity id="CreateAAIVfModule" name="CreateAAIVfModule" calledElement="CreateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="DCVFM_vfModuleId" target="newVfModuleId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="CreateAAIVfModuleResponse" target="DCVFM_createVfModuleResponse" />
+ <camunda:in source="DCVFM_vnfId" target="vnfId" />
+ <camunda:in source="DCVFM_vnfName" target="vnfName" />
+ <camunda:in source="DCVFM_vnfType" target="vnfType" />
+ <camunda:in source="DCVFM_serviceId" target="serviceId" />
+ <camunda:in source="DCVFM_personaModelId" target="personaModelId" />
+ <camunda:in source="DCVFM_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="DCVFM_vfModuleName" target="vfModuleName" />
+ <camunda:in source="DCVFM_vfModuleModelName" target="vfModuleModelName" />
+ <camunda:in source="DCVFM_personaModelVersion" target="personaModelVersion" />
+ <camunda:in source="DCVFM_modelCustomizationUuid" target="modelCustomizationId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="CreateAAIVfModule" targetRef="PostProcessCreateAAIVfModule" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_183x8vk" name="need to create network policies in AAI?" default="SequenceFlow_0xfanpi">
+ <bpmn2:incoming>SequenceFlow_1ushk1d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ery1pk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xfanpi</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ushk1d" sourceRef="PostProcessVNFAdapterRequest" targetRef="ExclusiveGateway_183x8vk" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ery1pk" name="yes" sourceRef="ExclusiveGateway_183x8vk" targetRef="CreateNetworkPoliciesInAAI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList") != null && !execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xfanpi" name="no" sourceRef="ExclusiveGateway_183x8vk" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0abffyj" sourceRef="CreateNetworkPoliciesInAAI" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:scriptTask id="CreateNetworkPoliciesInAAI" name="Create Network Policies In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ery1pk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0abffyj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.createNetworkPoliciesInAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0f54imv" name="need to update VNF in AAI?" default="SequenceFlow_1k5uku2">
+ <bpmn2:incoming>SequenceFlow_0363dz7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bi38s7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1k5uku2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1edqxlf">
+ <bpmn2:incoming>SequenceFlow_112los9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1k5uku2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1avfxsz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bi38s7" name="yes" sourceRef="ExclusiveGateway_0f54imv" targetRef="PreProcessUpdateAAIGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[!execution.getVariable("DCVFM_oamManagementV4Address").isEmpty() || !execution.getVariable("DCVFM_oamManagementV6Address").isEmpty()]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qm81ym" sourceRef="PreProcessUpdateAAIGenericVnf" targetRef="UpdateAAIGenericVNFTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_112los9" sourceRef="UpdateAAIGenericVNFTask" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1k5uku2" name="no" sourceRef="ExclusiveGateway_0f54imv" targetRef="ExclusiveGateway_1edqxlf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1avfxsz" sourceRef="ExclusiveGateway_1edqxlf" targetRef="PreProcessUpdateAAIVfModule_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0363dz7" sourceRef="IntermediateCatchEvent_3" targetRef="ExclusiveGateway_0f54imv" />
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVnf" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bi38s7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qm81ym</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIGenericVNFTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVM_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qm81ym</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_112los9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zcfn2x" name="no" sourceRef="ExclusiveGateway_2" targetRef="IntermediateThrowEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0m382su" name="yes" sourceRef="ExclusiveGateway_2" targetRef="QueryVNF">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_sdncVersion" ) == '1707'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g270u0" sourceRef="PreProcessSDNCVnfGetRequest" targetRef="CallSDNCAdapterVNFTopologyGET" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yrlvgb" sourceRef="CallSDNCAdapterVNFTopologyGET" targetRef="PostProcessSDNCVnfGetRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCVnfGetRequest" name="PreProcess SDNC VNF Topology GET Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0d00zqi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g270u0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution, 'vnf')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVNFTopologyGET" name="Call SDNC Adapter: VNF Topology GET" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFM_getVnfSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0g270u0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yrlvgb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCVnfGetRequest" name="PostProcess SDNC VNF Toplogy GET request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yrlvgb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_170kw7h</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DCVFM_getVnfSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0d00zqi" sourceRef="QueryVNF" targetRef="PreProcessSDNCVnfGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_170kw7h" sourceRef="PostProcessSDNCVnfGetRequest" targetRef="IntermediateThrowEvent_3" />
+ <bpmn2:callActivity id="QueryVNF" name="Query VNF" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_vnfId" target="GENGV_vnfId" />
+ <camunda:in source="DCVFM_vnfTypeToQuery" target="GENGV_type" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="GENGV_vnf" target="DCVFM_vnfQueryResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0m382su</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0d00zqi</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f53tby" sourceRef="Task_0kuj2a1" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ffvqla" name="Is vf_module_name specified?" default="SequenceFlow_0270n5c">
+ <bpmn2:incoming>SequenceFlow_1y1ttqe</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0lilmm3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0270n5c</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05og7iw</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0270n5c" name="yes" sourceRef="ExclusiveGateway_0ffvqla" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05og7iw" name="no" sourceRef="ExclusiveGateway_0ffvqla" targetRef="Task_0kuj2a1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_vfModuleName") == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0kuj2a1" name="Generate VF Module Name" calledElement="GenerateVfModuleName">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_vnfId" target="vnfId" />
+ <camunda:in source="DCVFM_vnfName" target="vnfName" />
+ <camunda:in source="DCVFM_vfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="DCVFM_pesonaModelId" target="personaModelId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vfModuleName" target="DCVFM_vfModuleName" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_05og7iw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f53tby</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="SubProcess_0ltzufk" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_18lzc5m">
+ <bpmn2:outgoing>SequenceFlow_02lc25j</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0wsdptv">
+ <bpmn2:incoming>SequenceFlow_0z2rczk</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1pgo10r</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="CallDoCreateVfModuleRollback" name="Call DoCreateVfModuleRollback" calledElement="DoCreateVfModuleRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackError" target="rollbackError" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="DCVFM_aLaCarte" target="aLaCarte" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1i1q78e</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0112l2c</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PreProcessRollback" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04bd5in</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1i1q78e</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessRollback" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0112l2c</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0z2rczk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_02lc25j" sourceRef="StartEvent_18lzc5m" targetRef="ExclusiveGateway_039bib8" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0z2rczk" sourceRef="PostProcessRollback" targetRef="EndEvent_0wsdptv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1i1q78e" sourceRef="PreProcessRollback" targetRef="CallDoCreateVfModuleRollback" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0112l2c" sourceRef="CallDoCreateVfModuleRollback" targetRef="PostProcessRollback" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_039bib8" name="Disable Rollback?" default="SequenceFlow_04bd5in">
+ <bpmn2:incoming>SequenceFlow_02lc25j</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04bd5in</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1nh7m8d</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_04bd5in" name="no" sourceRef="ExclusiveGateway_039bib8" targetRef="PreProcessRollback" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1nh7m8d" name="yes" sourceRef="ExclusiveGateway_039bib8" targetRef="Task_1fm09pi">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="Task_1fm09pi" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1nh7m8d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pgo10r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pgo10r" sourceRef="Task_1fm09pi" targetRef="EndEvent_0wsdptv" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0jw7ymg" name="Is 2 Phased Design?" default="SequenceFlow_006rnym">
+ <bpmn2:incoming>SequenceFlow_0cc17yk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17cp3tn</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_006rnym</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_volumeGroupId") != null && execution.getVariable("DCVFM_volumeGroupId") != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19933zh" name="Is aLaCarte?" default="SequenceFlow_1y1ttqe">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1y1ttqe</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1y8q87e</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1y1ttqe" name="no" sourceRef="ExclusiveGateway_19933zh" targetRef="ExclusiveGateway_0ffvqla" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02fd6gx" name="Is already PendingActivation or Assigned?" default="SequenceFlow_0lilmm3">
+ <bpmn2:incoming>SequenceFlow_1sf1091</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lilmm3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15i583d</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lilmm3" name="no" sourceRef="ExclusiveGateway_02fd6gx" targetRef="ExclusiveGateway_0ffvqla" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1y8q87e" name="yes" sourceRef="ExclusiveGateway_19933zh" targetRef="Task_14n44kb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_aLaCarte") == true]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1sf1091" sourceRef="Task_14n44kb" targetRef="ExclusiveGateway_02fd6gx" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17cp3tn" name="yes" sourceRef="ExclusiveGateway_0jw7ymg" targetRef="Task_0kqh1of">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_twoPhaseDesign") == true]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_0pd6bbj">
+ <bpmn2:incoming>SequenceFlow_00bh7m7</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15i583d" name="yes" sourceRef="ExclusiveGateway_02fd6gx" targetRef="ExclusiveGateway_1f6x9ii">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_orchestrationStatus") == "PendingActivation" || execution.getVariable("DCVFM_orchestrationStatus") == "Assigned"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0gsliyw" name="Is aLaCarte?" default="SequenceFlow_1iyt5i4">
+ <bpmn2:incoming>SequenceFlow_1nh92s8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16mgvsd</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1iyt5i4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_16mgvsd" name="yes" sourceRef="ExclusiveGateway_0gsliyw" targetRef="Task_08tnqe1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_aLaCarte") == true]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1nh92s8" sourceRef="PostProcessSDNCAssignRequest" targetRef="ExclusiveGateway_0gsliyw" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0cc17yk" sourceRef="Task_08tnqe1" targetRef="ExclusiveGateway_0jw7ymg" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1iyt5i4" name="no" sourceRef="ExclusiveGateway_0gsliyw" targetRef="Task_19zw1li" />
+ <bpmn2:sequenceFlow id="SequenceFlow_006rnym" name="no" sourceRef="ExclusiveGateway_0jw7ymg" targetRef="Task_19zw1li" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ynd0iy" sourceRef="Task_0kqh1of" targetRef="Task_08z2aai" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00bh7m7" sourceRef="Task_16p51r4" targetRef="EndEvent_0pd6bbj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1mnipp8" sourceRef="Task_08z2aai" targetRef="Task_16p51r4" />
+ <bpmn2:callActivity id="Task_08z2aai" name="Update AAI VF Module PendingActivation" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVFM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ynd0iy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mnipp8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_0kqh1of" name="PrepareUpdateAAIVfModulePendingActivation" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17cp3tn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ynd0iy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestStatus(execution, 'PendingActivation')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_08tnqe1" name="Query Catalog DB" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16mgvsd</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cc17yk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryCatalogDB(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_14n44kb" name="Query AAI for Orchestration Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1y8q87e</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1sf1091</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModuleForStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_16p51r4" name="Set Success Indicator 1st Phase" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1mnipp8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00bh7m7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.setSuccessIndicator(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1f6x9ii" name="Is volume_group_id specified for stage 2?" default="SequenceFlow_0tfrcnc">
+ <bpmn2:incoming>SequenceFlow_15i583d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0tfrcnc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0oadvvx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tfrcnc" name="no" sourceRef="ExclusiveGateway_1f6x9ii" targetRef="ExclusiveGateway_09r5rvt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0oadvvx" name="yes" sourceRef="ExclusiveGateway_1f6x9ii" targetRef="Task_0dx8gpp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFM_volumeGroupId") != null && execution.getVariable("DCVFM_volumeGroupId") != "" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09r5rvt">
+ <bpmn2:incoming>SequenceFlow_0tfrcnc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0c6p4aa</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qzw172</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qzw172" sourceRef="ExclusiveGateway_09r5rvt" targetRef="ExclusiveGateway_04msdir" />
+ <bpmn2:sequenceFlow id="SequenceFlow_03batve" sourceRef="Task_0dx8gpp" targetRef="Task_0e8s9xm" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c6p4aa" sourceRef="Task_0e8s9xm" targetRef="ExclusiveGateway_09r5rvt" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_04msdir" name="Is Base VF Module for stage 2?" default="SequenceFlow_0p3cspl">
+ <bpmn2:incoming>SequenceFlow_1qzw172</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xed5sn</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0p3cspl</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xed5sn" name="yes" sourceRef="ExclusiveGateway_04msdir" targetRef="ExclusiveGateway_1biy4yg">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0p3cspl" name="no" sourceRef="ExclusiveGateway_04msdir" targetRef="Task_0cdjxcd" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1biy4yg">
+ <bpmn2:incoming>SequenceFlow_0xed5sn</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1k7xbcu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0p61zug</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0p61zug" sourceRef="ExclusiveGateway_1biy4yg" targetRef="PreProcessSDNCGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1k7xbcu" sourceRef="Task_0cdjxcd" targetRef="ExclusiveGateway_1biy4yg" />
+ <bpmn2:scriptTask id="Task_0dx8gpp" name="Query Cloud Region For Stage 2" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0oadvvx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03batve</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.queryCloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_0e8s9xm" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DCVFM_tenantId" target="tenantId" />
+ <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_03batve</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c6p4aa</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_0cdjxcd" name="Query AAI Vf Module for Stage 2" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0p3cspl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1k7xbcu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_19zw1li" name="PrepareUpdateAAIVfModuleAssign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_006rnym</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1iyt5i4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0thm33s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestStatus(execution, 'Assigned')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_01b1fio" name="Update AAI VF Module Assigned" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="WorkflowResponse" target="DCVFM_updateAAIVfModuleResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0thm33s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0aegg0r</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0thm33s" sourceRef="Task_19zw1li" targetRef="Task_01b1fio" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0aegg0r" sourceRef="Task_01b1fio" targetRef="PreProcessSDNCGetRequest" />
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRequest" />
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds x="38" y="153" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="44" y="189" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
+ <di:waypoint xsi:type="dc:Point" x="74" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="99" y="171" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="147" y="131" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_24" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="36" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="0" y="417" width="114" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_22" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="828" y="153" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="869" y="173" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="CallSDNCAdapterVDModuleTopologyAssign">
+ <dc:Bounds x="266" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CallSDNCAdapterVFModuleTopologyGET">
+ <dc:Bounds x="254" y="1029" width="133" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="IsVolumeGroupIdSpecified" isMarkerVisible="true">
+ <dc:Bounds x="144" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="89" y="347" width="178" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ConfirmVolumeGroupTenant">
+ <dc:Bounds x="209" y="528" width="118" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_91" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="559" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="423" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="194" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="393" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="CallVNFAdapterVFModuleCreate">
+ <dc:Bounds x="746" y="1031" width="121" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">
+ <dc:Bounds x="717" y="1211" width="117" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">
+ <dc:Bounds x="1039" y="1209" width="119" height="99" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="1384" y="1234" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1381" y="1206" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">
+ <dc:Bounds x="1688" y="1204" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds x="1813" y="1072" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1838" y="1127" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1808" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="1838" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="1838" y="1162" />
+ <di:waypoint xsi:type="dc:Point" x="1838" y="1122" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1834" y="1260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_ExclusiveGateway_93">
+ <di:waypoint xsi:type="dc:Point" x="1409" y="1234" />
+ <di:waypoint xsi:type="dc:Point" x="1409" y="1097" />
+ <di:waypoint xsi:type="dc:Point" x="1813" y="1097" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="1143.6746987951808" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateCatchEvent_24" targetElement="_BPMNShape_ExclusiveGateway_90">
+ <di:waypoint xsi:type="dc:Point" x="72" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_101" bpmnElement="IsVolumeGroupNameSpecified" isMarkerVisible="true">
+ <dc:Bounds x="360" y="547" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="496" width="200" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ExclusiveGateway_101">
+ <di:waypoint xsi:type="dc:Point" x="327" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="572" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="ConfirmVolumeName">
+ <dc:Bounds x="453" y="528" width="109" height="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_Task_3">
+ <di:waypoint xsi:type="dc:Point" x="410" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="453" y="572" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="410" y="576" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="385" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="385" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_Task_3" targetElement="_BPMNShape_ExclusiveGateway_91">
+ <di:waypoint xsi:type="dc:Point" x="561" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="418" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="492" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_IntermediateThrowEvent_22">
+ <di:waypoint xsi:type="dc:Point" x="247" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="275" y="156" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_91" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="609" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="628" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="696" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="394" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="PreProcessSDNCAssignRequest">
+ <dc:Bounds x="109" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="435" y="674" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_44" bpmnElement="IntermediateThrowEvent_3">
+ <dc:Bounds x="2193" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2181" y="417" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_29" bpmnElement="IntermediateCatchEvent_2">
+ <dc:Bounds x="24" y="706" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="13" y="747" width="58" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateCatchEvent_29" targetElement="_BPMNShape_ScriptTask_178">
+ <di:waypoint xsi:type="dc:Point" x="60" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="109" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="78" y="722" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="229" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="386" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="435" y="721" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_213" bpmnElement="PreProcessSDNCGetRequest">
+ <dc:Bounds x="98" y="1031" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">
+ <dc:Bounds x="434" y="1031" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="218" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="236" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="236" y="1077" />
+ <di:waypoint xsi:type="dc:Point" x="254" y="1077" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="251" y="1068" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_ScriptTask_214">
+ <di:waypoint xsi:type="dc:Point" x="386" y="1077" />
+ <di:waypoint xsi:type="dc:Point" x="409" y="1077" />
+ <di:waypoint xsi:type="dc:Point" x="409" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1078" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="410" y="1078" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">
+ <dc:Bounds x="558" y="1211" width="118" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">
+ <dc:Bounds x="884" y="1210" width="118" height="98" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">
+ <dc:Bounds x="1201" y="1211" width="121" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ScriptTask_174">
+ <di:waypoint xsi:type="dc:Point" x="676" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="717" y="1259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="697" y="1234" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_Task_33">
+ <di:waypoint xsi:type="dc:Point" x="833" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="884" y="1259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="859" y="1234" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_Task_33" targetElement="_BPMNShape_ScriptTask_175">
+ <di:waypoint xsi:type="dc:Point" x="1002" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="1258" />
+ <di:waypoint xsi:type="dc:Point" x="1039" y="1258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1035" y="1249" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_Task_4">
+ <di:waypoint xsi:type="dc:Point" x="1157" y="1258" />
+ <di:waypoint xsi:type="dc:Point" x="1201" y="1258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1179" y="1233" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_4" targetElement="_BPMNShape_ExclusiveGateway_92">
+ <di:waypoint xsi:type="dc:Point" x="1321" y="1258" />
+ <di:waypoint xsi:type="dc:Point" x="1353" y="1258" />
+ <di:waypoint xsi:type="dc:Point" x="1353" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="1384" y="1259" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1368" y="1249" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">
+ <dc:Bounds x="2107" y="1079" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2125" y="1120" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_93" targetElement="_BPMNShape_ScriptTask_218">
+ <di:waypoint xsi:type="dc:Point" x="1863" y="1097" />
+ <di:waypoint xsi:type="dc:Point" x="1929" y="1096" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1896" y="1082" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="1281" y="1060" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1257" y="1101" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="-27" y="1241" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-35" y="1282" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <dc:Bounds x="1502" y="1204" width="121" height="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_Task_7" targetElement="_BPMNShape_ScriptTask_176">
+ <di:waypoint xsi:type="dc:Point" x="1623" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="1688" y="1260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1656" y="1245" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">
+ <dc:Bounds x="583" y="1031" width="121" height="96" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="907" y="1033" width="116" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_214" targetElement="_BPMNShape_Task_25">
+ <di:waypoint xsi:type="dc:Point" x="554" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="569" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="569" y="1079" />
+ <di:waypoint xsi:type="dc:Point" x="583" y="1079" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="1069" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_Task_25" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="703" y="1079" />
+ <di:waypoint xsi:type="dc:Point" x="746" y="1079" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="725" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_Task_35">
+ <di:waypoint xsi:type="dc:Point" x="866" y="1079" />
+ <di:waypoint xsi:type="dc:Point" x="907" y="1079" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="1054" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds x="1224" y="516" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_211" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds x="1128" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="336" width="124" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_212" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1408" y="368" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1395" y="329" width="75" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1153" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1153" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1224" y="562" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="450" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1178" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1285" y="393" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_216" bpmnElement="PostProcessCreateAAIVfModule">
+ <dc:Bounds x="897" y="348" width="125" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_216" targetElement="_BPMNShape_ExclusiveGateway_211">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1075" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1128" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1072" y="394" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ExclusiveGateway_212">
+ <di:waypoint xsi:type="dc:Point" x="1348" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="562" />
+ <di:waypoint xsi:type="dc:Point" x="1378" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1408" y="393" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1393" y="468" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="ScriptTask_setSuccess">
+ <dc:Bounds x="1929" y="1049" width="128" height="95" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_EndEvent_175">
+ <di:waypoint xsi:type="dc:Point" x="2057" y="1097" />
+ <di:waypoint xsi:type="dc:Point" x="2107" y="1096" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2082" y="1082" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="QueryCloudRegion">
+ <dc:Bounds x="101" y="440" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ScriptTask_254">
+ <di:waypoint xsi:type="dc:Point" x="169" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="429" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="440" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="417" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="168" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="524" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="208" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="574" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="CreateAAIVfModule">
+ <dc:Bounds x="696" y="348" width="121" height="92" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_216">
+ <di:waypoint xsi:type="dc:Point" x="816" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="897" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="857" y="369" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_183x8vk_di" bpmnElement="ExclusiveGateway_183x8vk" isMarkerVisible="true">
+ <dc:Bounds x="1076" y="1055" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1056" y="1105" width="89" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ushk1d_di" bpmnElement="SequenceFlow_1ushk1d">
+ <di:waypoint xsi:type="dc:Point" x="1023" y="1079" />
+ <di:waypoint xsi:type="dc:Point" x="1076" y="1080" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1050" y="1065" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ery1pk_di" bpmnElement="SequenceFlow_0ery1pk">
+ <di:waypoint xsi:type="dc:Point" x="1101" y="1055" />
+ <di:waypoint xsi:type="dc:Point" x="1101" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="979" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1054" y="1267" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xfanpi_di" bpmnElement="SequenceFlow_0xfanpi">
+ <di:waypoint xsi:type="dc:Point" x="1126" y="1080" />
+ <di:waypoint xsi:type="dc:Point" x="1281" y="1078" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1198" y="1054" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0abffyj_di" bpmnElement="SequenceFlow_0abffyj">
+ <di:waypoint xsi:type="dc:Point" x="1247" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="1299" y="979" />
+ <di:waypoint xsi:type="dc:Point" x="1299" y="1060" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1273" y="964" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dv7amn_di" bpmnElement="CreateNetworkPoliciesInAAI">
+ <dc:Bounds x="1147" y="939" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f54imv_di" bpmnElement="ExclusiveGateway_0f54imv" isMarkerVisible="true">
+ <dc:Bounds x="64" y="1235" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="51" y="1200" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1edqxlf_di" bpmnElement="ExclusiveGateway_1edqxlf" isMarkerVisible="true">
+ <dc:Bounds x="432" y="1235" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="457" y="1285" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bi38s7_di" bpmnElement="SequenceFlow_0bi38s7">
+ <di:waypoint xsi:type="dc:Point" x="89" y="1285" />
+ <di:waypoint xsi:type="dc:Point" x="89" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="142" y="1438" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="95" y="1362" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm81ym_di" bpmnElement="SequenceFlow_1qm81ym">
+ <di:waypoint xsi:type="dc:Point" x="242" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="278" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="278" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="314" y="1438" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="293" y="1438" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_112los9_di" bpmnElement="SequenceFlow_112los9">
+ <di:waypoint xsi:type="dc:Point" x="414" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="1438" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="1285" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="436" y="1423" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1k5uku2_di" bpmnElement="SequenceFlow_1k5uku2">
+ <di:waypoint xsi:type="dc:Point" x="114" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="432" y="1260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="267" y="1245" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1avfxsz_di" bpmnElement="SequenceFlow_1avfxsz">
+ <di:waypoint xsi:type="dc:Point" x="482" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="1260" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="1260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="535" y="1260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0363dz7_di" bpmnElement="SequenceFlow_0363dz7">
+ <di:waypoint xsi:type="dc:Point" x="9" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="64" y="1260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="37" y="1235" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o3bcyq_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="142" y="1399" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0j45ic9_di" bpmnElement="UpdateAAIGenericVNFTask">
+ <dc:Bounds x="314" y="1398" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zcfn2x_di" bpmnElement="SequenceFlow_0zcfn2x">
+ <di:waypoint xsi:type="dc:Point" x="1458" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="2193" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1822" y="368.5010168687388" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m382su_di" bpmnElement="SequenceFlow_0m382su">
+ <di:waypoint xsi:type="dc:Point" x="1433" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1433" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1513" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1439" y="459.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g270u0_di" bpmnElement="SequenceFlow_0g270u0">
+ <di:waypoint xsi:type="dc:Point" x="1766" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1816" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1791" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yrlvgb_di" bpmnElement="SequenceFlow_1yrlvgb">
+ <di:waypoint xsi:type="dc:Point" x="1916" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1969" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1943" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1j22oyj_di" bpmnElement="PreProcessSDNCVnfGetRequest">
+ <dc:Bounds x="1666" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_10t4tix_di" bpmnElement="CallSDNCAdapterVNFTopologyGET">
+ <dc:Bounds x="1816" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_09wgk9p_di" bpmnElement="PostProcessSDNCVnfGetRequest">
+ <dc:Bounds x="1969" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d00zqi_di" bpmnElement="SequenceFlow_0d00zqi">
+ <di:waypoint xsi:type="dc:Point" x="1613" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1666" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1640" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_170kw7h_di" bpmnElement="SequenceFlow_170kw7h">
+ <di:waypoint xsi:type="dc:Point" x="2069" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="2131" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="2131" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="2193" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2146" y="447.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0xev9kl_di" bpmnElement="QueryVNF">
+ <dc:Bounds x="1513" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f53tby_di" bpmnElement="SequenceFlow_1f53tby">
+ <di:waypoint xsi:type="dc:Point" x="776" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="846" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="846" y="189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="267" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ffvqla_di" bpmnElement="ExclusiveGateway_0ffvqla" isMarkerVisible="true">
+ <dc:Bounds x="592" y="146" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="98" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0270n5c_di" bpmnElement="SequenceFlow_0270n5c">
+ <di:waypoint xsi:type="dc:Point" x="642" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="145" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05og7iw_di" bpmnElement="SequenceFlow_05og7iw">
+ <di:waypoint xsi:type="dc:Point" x="617" y="196" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="676" y="282" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="239" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_14nvmgk_di" bpmnElement="Task_0kuj2a1">
+ <dc:Bounds x="676" y="242" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0ltzufk_di" bpmnElement="SubProcess_0ltzufk" isExpanded="true">
+ <dc:Bounds x="-52" y="1578" width="1047" height="338" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_18lzc5m_di" bpmnElement="StartEvent_18lzc5m">
+ <dc:Bounds x="91" y="1682" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="109" y="1723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0wsdptv_di" bpmnElement="EndEvent_0wsdptv">
+ <dc:Bounds x="859" y="1682" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="877" y="1723" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ehr5kq_di" bpmnElement="CallDoCreateVfModuleRollback">
+ <dc:Bounds x="507" y="1660" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0upatdd_di" bpmnElement="PreProcessRollback">
+ <dc:Bounds x="327" y="1660" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0o1zc29_di" bpmnElement="PostProcessRollback">
+ <dc:Bounds x="692" y="1660" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_02lc25j_di" bpmnElement="SequenceFlow_02lc25j">
+ <di:waypoint xsi:type="dc:Point" x="127" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="194" y="1700" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="161" y="1685" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0z2rczk_di" bpmnElement="SequenceFlow_0z2rczk">
+ <di:waypoint xsi:type="dc:Point" x="792" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="824" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="824" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="859" y="1700" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="839" y="1700" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i1q78e_di" bpmnElement="SequenceFlow_1i1q78e">
+ <di:waypoint xsi:type="dc:Point" x="427" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="1700" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="467" y="1685" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0112l2c_di" bpmnElement="SequenceFlow_0112l2c">
+ <di:waypoint xsi:type="dc:Point" x="607" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="692" y="1700" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="650" y="1685" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_039bib8_di" bpmnElement="ExclusiveGateway_039bib8" isMarkerVisible="true">
+ <dc:Bounds x="194" y="1675" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="175" y="1647" width="87" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04bd5in_di" bpmnElement="SequenceFlow_04bd5in">
+ <di:waypoint xsi:type="dc:Point" x="244" y="1700" />
+ <di:waypoint xsi:type="dc:Point" x="327" y="1700" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="280" y="1685" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nh7m8d_di" bpmnElement="SequenceFlow_1nh7m8d">
+ <di:waypoint xsi:type="dc:Point" x="219" y="1725" />
+ <di:waypoint xsi:type="dc:Point" x="219" y="1824" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="1824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="225" y="1775" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_05v20n0_di" bpmnElement="Task_1fm09pi">
+ <dc:Bounds x="507" y="1784" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pgo10r_di" bpmnElement="SequenceFlow_1pgo10r">
+ <di:waypoint xsi:type="dc:Point" x="607" y="1824" />
+ <di:waypoint xsi:type="dc:Point" x="877" y="1824" />
+ <di:waypoint xsi:type="dc:Point" x="877" y="1718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="742" y="1809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0jw7ymg_di" bpmnElement="ExclusiveGateway_0jw7ymg" isMarkerVisible="true">
+ <dc:Bounds x="803" y="696" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="797" y="653" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_Task_7">
+ <di:waypoint xsi:type="dc:Point" x="1434" y="1259" />
+ <di:waypoint xsi:type="dc:Point" x="1502" y="1260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1454" y="1264.6906474820144" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19933zh_di" bpmnElement="ExclusiveGateway_19933zh" isMarkerVisible="true">
+ <dc:Bounds x="302" y="146" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="295" y="196" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1y1ttqe_di" bpmnElement="SequenceFlow_1y1ttqe">
+ <di:waypoint xsi:type="dc:Point" x="352" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="592" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02fd6gx_di" bpmnElement="ExclusiveGateway_02fd6gx" isMarkerVisible="true">
+ <dc:Bounds x="447" y="-1" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="-48" width="89" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lilmm3_di" bpmnElement="SequenceFlow_0lilmm3">
+ <di:waypoint xsi:type="dc:Point" x="472" y="49" />
+ <di:waypoint xsi:type="dc:Point" x="472" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="592" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="482" y="100" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1y8q87e_di" bpmnElement="SequenceFlow_1y8q87e">
+ <di:waypoint xsi:type="dc:Point" x="327" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="327" y="64" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="95" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sf1091_di" bpmnElement="SequenceFlow_1sf1091">
+ <di:waypoint xsi:type="dc:Point" x="377" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="24" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="9" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17cp3tn_di" bpmnElement="SequenceFlow_17cp3tn">
+ <di:waypoint xsi:type="dc:Point" x="853" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="901" y="720" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="866" y="694.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0b33fd2_di" bpmnElement="EndEvent_0pd6bbj">
+ <dc:Bounds x="1367" y="701" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1385" y="737" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15i583d_di" bpmnElement="SequenceFlow_15i583d">
+ <di:waypoint xsi:type="dc:Point" x="497" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="24" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="513" y="3.588067006526856" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0gsliyw_di" bpmnElement="ExclusiveGateway_0gsliyw" isMarkerVisible="true">
+ <dc:Bounds x="592" y="694" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="656" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16mgvsd_di" bpmnElement="SequenceFlow_16mgvsd">
+ <di:waypoint xsi:type="dc:Point" x="642" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="668" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="641" y="696" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nh92s8_di" bpmnElement="SequenceFlow_1nh92s8">
+ <di:waypoint xsi:type="dc:Point" x="556" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="592" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="694.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cc17yk_di" bpmnElement="SequenceFlow_0cc17yk">
+ <di:waypoint xsi:type="dc:Point" x="768" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="705.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1iyt5i4_di" bpmnElement="SequenceFlow_1iyt5i4">
+ <di:waypoint xsi:type="dc:Point" x="617" y="744" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="119" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="466" y="776.3184256922661" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_006rnym_di" bpmnElement="SequenceFlow_006rnym">
+ <di:waypoint xsi:type="dc:Point" x="828" y="746" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="815" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="815" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="841" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="807" y="762.4025974025974" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ynd0iy_di" bpmnElement="SequenceFlow_0ynd0iy">
+ <di:waypoint xsi:type="dc:Point" x="1001" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="704" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00bh7m7_di" bpmnElement="SequenceFlow_00bh7m7">
+ <di:waypoint xsi:type="dc:Point" x="1312" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1367" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1340" y="704" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mnipp8_di" bpmnElement="SequenceFlow_1mnipp8">
+ <di:waypoint xsi:type="dc:Point" x="1157" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1185" y="704" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1bvhxkk_di" bpmnElement="Task_08z2aai">
+ <dc:Bounds x="1057" y="679" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_05mwaoo_di" bpmnElement="Task_0kqh1of">
+ <dc:Bounds x="901" y="679" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_059xue9_di" bpmnElement="Task_08tnqe1">
+ <dc:Bounds x="668" y="679" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1k3dub4_di" bpmnElement="Task_14n44kb">
+ <dc:Bounds x="277" y="-16" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0okxyur_di" bpmnElement="Task_16p51r4">
+ <dc:Bounds x="1212" y="679" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1f6x9ii_di" bpmnElement="ExclusiveGateway_1f6x9ii" isMarkerVisible="true">
+ <dc:Bounds x="559" y="-1" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="49" width="89" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tfrcnc_di" bpmnElement="SequenceFlow_0tfrcnc">
+ <di:waypoint xsi:type="dc:Point" x="609" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="946" y="24" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="9" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oadvvx_di" bpmnElement="SequenceFlow_0oadvvx">
+ <di:waypoint xsi:type="dc:Point" x="584" y="-1" />
+ <di:waypoint xsi:type="dc:Point" x="584" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="616" y="-63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="590" y="-42" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09r5rvt_di" bpmnElement="ExclusiveGateway_09r5rvt" isMarkerVisible="true">
+ <dc:Bounds x="946" y="-1" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="971" y="49" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qzw172_di" bpmnElement="SequenceFlow_1qzw172">
+ <di:waypoint xsi:type="dc:Point" x="996" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="1074" y="24" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1035" y="9" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03batve_di" bpmnElement="SequenceFlow_03batve">
+ <di:waypoint xsi:type="dc:Point" x="716" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="796" y="-63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="756" y="-78" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c6p4aa_di" bpmnElement="SequenceFlow_0c6p4aa">
+ <di:waypoint xsi:type="dc:Point" x="896" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="971" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="971" y="-1" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="934" y="-78" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_04msdir_di" bpmnElement="ExclusiveGateway_04msdir" isMarkerVisible="true">
+ <dc:Bounds x="1074" y="-1" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1057" y="49" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xed5sn_di" bpmnElement="SequenceFlow_0xed5sn">
+ <di:waypoint xsi:type="dc:Point" x="1124" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="1338" y="24" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1222" y="9" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p3cspl_di" bpmnElement="SequenceFlow_0p3cspl">
+ <di:waypoint xsi:type="dc:Point" x="1099" y="-1" />
+ <di:waypoint xsi:type="dc:Point" x="1099" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="1190" y="-63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1108" y="-41.26315789473686" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1biy4yg_di" bpmnElement="ExclusiveGateway_1biy4yg" isMarkerVisible="true">
+ <dc:Bounds x="1338" y="-1" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1363" y="49" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p61zug_di" bpmnElement="SequenceFlow_0p61zug">
+ <di:waypoint xsi:type="dc:Point" x="1388" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="1436" y="24" />
+ <di:waypoint xsi:type="dc:Point" x="1436" y="-170" />
+ <di:waypoint xsi:type="dc:Point" x="-60" y="-170" />
+ <di:waypoint xsi:type="dc:Point" x="-60" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="1078" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="688" y="-185" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1k7xbcu_di" bpmnElement="SequenceFlow_1k7xbcu">
+ <di:waypoint xsi:type="dc:Point" x="1290" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="1363" y="-63" />
+ <di:waypoint xsi:type="dc:Point" x="1363" y="-1" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1327" y="-78" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0ti2a86_di" bpmnElement="Task_0dx8gpp">
+ <dc:Bounds x="616" y="-103" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1r5f381_di" bpmnElement="Task_0e8s9xm">
+ <dc:Bounds x="796" y="-103" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0fajmo7_di" bpmnElement="Task_0cdjxcd">
+ <dc:Bounds x="1190" y="-103" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_065935d_di" bpmnElement="Task_19zw1li">
+ <dc:Bounds x="119" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_11w102e_di" bpmnElement="Task_01b1fio">
+ <dc:Bounds x="285" y="841" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0thm33s_di" bpmnElement="SequenceFlow_0thm33s">
+ <di:waypoint xsi:type="dc:Point" x="219" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="881" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="252" y="856" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aegg0r_di" bpmnElement="SequenceFlow_0aegg0r">
+ <di:waypoint xsi:type="dc:Point" x="385" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="881" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="953" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="953" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="1031" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="453" y="917" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
new file mode 100644
index 0000000000..2508b31f01
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
@@ -0,0 +1,978 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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="DoCreateVfModuleRollback" name="DoCreateVfModuleRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Rollback PrepareUpdateAAIVfModule?" default="SequenceFlow_9">
+ <bpmn2:incoming>SequenceFlow_11er1t8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke&#10;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="PUAAIVfMod_heatStackId" target="DCVFMR_heatStackId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="InvokePrepareUpdateAAIVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true" && !(execution.getVariable('aLaCarte') == true && execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="ExclusiveGateway_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="no" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Rollback 1707 SDNC Activate?" default="SequenceFlow_15">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1p0v6yk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" />
+ <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke&#10;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_DoCreateVfModuleRollbackResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08aruzz</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="PrepareSDNCDeactivateRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true" && execution.getVariable("sdncVersion") == "1707"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_1938vz9" />
+ <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" />
+ <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke&#10;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Rollback Update AAI Vf Module?" default="SequenceFlow_17">
+ <bpmn2:incoming>SequenceFlow_1gcfdej</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="yes" sourceRef="ExclusiveGateway_3" targetRef="UpdateAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackUpdateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="no" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_4" name="Rollback SDNC Request?" default="SequenceFlow_20">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_1h87hhh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" || execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="no" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_5" />
+ <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1rpg6ac</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepSDNCAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" />
+ <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke&#10;SDNCAdapterV1" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFMR_DoCreateVfModuleRollbackResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Delete AAI VF Modlue?" default="SequenceFlow_21">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12otwa4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="SetSuccessfulRollbackStatus" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="yes" sourceRef="ExclusiveGateway_5" targetRef="DeleteAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke&#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="SetSuccessfulRollbackStatus" />
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_0ggp8wz</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1h8ve60</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepDeleteAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.sdncValidateResponse(execution, DCVFMR_DoCreateVfModuleRollbackResponse)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_5" />
+ <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true">
+ <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="SetFailedRollbackStatus" />
+ <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_02fx6z6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event')
+dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_02fx6z6" sourceRef="SetFailedRollbackStatus" targetRef="LogSaveWorkflowException" />
+ <bpmn2:scriptTask id="SetFailedRollbackStatus" name="Set Failed Rollback Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_02fx6z6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.setFailedRollbackStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:subProcess>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2" />
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1yozzae" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0a0hroy" name="Rollback Update AAI Generic VNF?" default="SequenceFlow_185bo77">
+ <bpmn2:incoming>SequenceFlow_0djpj3r</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0n58kg1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_185bo77</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_111l1he</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="Task_08csf14" name="Delete Network Policies from AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0unumxv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0djpj3r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_18r7u02" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_111l1he</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ca4brn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_01ajtiy" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMR_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ca4brn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19r2uus</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0djpj3r" sourceRef="Task_08csf14" targetRef="ExclusiveGateway_0a0hroy" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0uvarlv" name="Rollback VNF Adapter Create?" default="SequenceFlow_03i4czf">
+ <bpmn2:incoming>SequenceFlow_185bo77</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19r2uus</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p0v6yk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_03i4czf</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_185bo77" name="no" sourceRef="ExclusiveGateway_0a0hroy" targetRef="ExclusiveGateway_0uvarlv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_111l1he" name="yes" sourceRef="ExclusiveGateway_0a0hroy" targetRef="Task_18r7u02">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackUpdateVnfAAI") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ca4brn" sourceRef="Task_18r7u02" targetRef="Task_01ajtiy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19r2uus" sourceRef="Task_01ajtiy" targetRef="ExclusiveGateway_0uvarlv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1p0v6yk" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_0uvarlv" targetRef="VNFAdapterPrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackVnfAdapterCreate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_03i4czf" name="no" sourceRef="ExclusiveGateway_0uvarlv" targetRef="ExclusiveGateway_0ahc44p" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1yozzae" name="Skip Rollback?" default="SequenceFlow_11er1t8">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11er1t8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ggp8wz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_11er1t8" name="no" sourceRef="ExclusiveGateway_1yozzae" targetRef="ExclusiveGateway_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ggp8wz" name="yes" sourceRef="ExclusiveGateway_1yozzae" targetRef="EndEvent_9">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1938vz9" name="Rollback Network Policies Creation?" default="SequenceFlow_0n58kg1">
+ <bpmn2:incoming>SequenceFlow_06rm0hg</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0n58kg1</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0unumxv</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PrepareSDNCDeactivateRequest" name="Prepare SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ugalf8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessSDNCDeactivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCDeactivate" name="Call SDNC Adapter Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMR_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFMR_deactivateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ugalf8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0n78x37</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCDeactivateRequest" name="PostProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0n78x37</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06rm0hg</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+String response = execution.getVariable("DCVFMR_deactivateSDNCAdapterResponse")
+dcvfmr.sdncValidateResponse(execution, response)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ugalf8" sourceRef="PrepareSDNCDeactivateRequest" targetRef="CallSDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n78x37" sourceRef="CallSDNCDeactivate" targetRef="PostProcessSDNCDeactivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06rm0hg" sourceRef="PostProcessSDNCDeactivateRequest" targetRef="ExclusiveGateway_1938vz9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n58kg1" name="no" sourceRef="ExclusiveGateway_1938vz9" targetRef="ExclusiveGateway_0a0hroy" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0unumxv" name="yes" sourceRef="ExclusiveGateway_1938vz9" targetRef="Task_08csf14">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1iufuuu" sourceRef="PrepareSDNCUnassignRequest" targetRef="CallSDNCAdapterUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1l4n37b" sourceRef="CallSDNCAdapterUnassign" targetRef="PostProcessSDNCUnassignRequest" />
+ <bpmn2:scriptTask id="PrepareSDNCUnassignRequest" name="Prepare SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16ghmax</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1iufuuu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessSDNCUnassignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterUnassign" name="Call SDNC Adapter Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMR_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVFMR_unassignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1iufuuu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1l4n37b</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCUnassignRequest" name="PostProcess SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1l4n37b</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12otwa4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+String response = execution.getVariable("DCVFMR_unassignSDNCAdapterResponse")
+dcvfmr.sdncValidateResponse(execution, response)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1h87hhh" name="Rollback 1707 SDNC Activate?" default="SequenceFlow_1rpg6ac">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rpg6ac</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16ghmax</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rpg6ac" name="no" sourceRef="ExclusiveGateway_1h87hhh" targetRef="SDNCAdapterPrep2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_16ghmax" name="yes" sourceRef="ExclusiveGateway_1h87hhh" targetRef="PrepareSDNCUnassignRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" && execution.getVariable("sdncVersion") == "1707"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_12otwa4" sourceRef="PostProcessSDNCUnassignRequest" targetRef="ExclusiveGateway_5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h8ve60" sourceRef="SetSuccessfulRollbackStatus" targetRef="EndEvent_9" />
+ <bpmn2:scriptTask id="SetSuccessfulRollbackStatus" name="Set Successful Rollback Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17it51d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h8ve60</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.setSuccessfulRollbackStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ahc44p" name="Set AAI Status to Assigned?" default="SequenceFlow_1gcfdej">
+ <bpmn2:incoming>SequenceFlow_03i4czf</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08aruzz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gcfdej</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_17ne2iz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1gcfdej" name="no" sourceRef="ExclusiveGateway_0ahc44p" targetRef="ExclusiveGateway_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17ne2iz" name="yes" sourceRef="ExclusiveGateway_0ahc44p" targetRef="Task_1sqxedz">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable('aLaCarte') == true && execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_17it51d" sourceRef="Task_0k9gnp2" targetRef="SetSuccessfulRollbackStatus" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0fvuowt" sourceRef="Task_1sqxedz" targetRef="Task_0k9gnp2" />
+ <bpmn2:callActivity id="Task_0k9gnp2" name="Invoke UpdateAAIVfModule to Assigned" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0fvuowt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17it51d</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_1sqxedz" name="UpdateAAIVfModule To Assigned Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17ne2iz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0fvuowt</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepUpdateAAIVfModuleToAssigned(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_08aruzz" sourceRef="InvokeVNFAdapterRestV1" targetRef="ExclusiveGateway_0ahc44p" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds x="13" y="100" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="31" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds x="115" y="78" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="49" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="115" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="103" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
+ <dc:Bounds x="725" y="23" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="104" y="763" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="262" y="763" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_CallActivity_13">
+ <di:waypoint xsi:type="dc:Point" x="204" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="262" y="803" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="225" y="803" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="732" y="758" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="912" y="758" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="187" y="995" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="327" y="995" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="704" y="998" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="860" y="998" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
+ <di:waypoint xsi:type="dc:Point" x="287" y="1035" />
+ <di:waypoint xsi:type="dc:Point" x="327" y="1035" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="307" y="1035" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">
+ <di:waypoint xsi:type="dc:Point" x="804" y="1038" />
+ <di:waypoint xsi:type="dc:Point" x="860" y="1038" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="820" y="1038" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="1159" y="1105" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1177" y="1146" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="960" y="1038" />
+ <di:waypoint xsi:type="dc:Point" x="1078" y="1038" />
+ <di:waypoint xsi:type="dc:Point" x="1078" y="1083" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1019" y="1023" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="538" y="93" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="152" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="215" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="278" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="247" y="103" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="912" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="152" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="563" y="93" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="39.419820324530114" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="825" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="862" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="92" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="63" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="588" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="743" y="117.50867542935495" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="937" y="142" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="229" />
+ <di:waypoint xsi:type="dc:Point" x="29" y="229" />
+ <di:waypoint xsi:type="dc:Point" x="29" y="321" />
+ <di:waypoint xsi:type="dc:Point" x="203" y="321" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="235" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="594" y="837" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="578" y="892" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">
+ <di:waypoint xsi:type="dc:Point" x="644" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="798" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="803" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">
+ <di:waypoint xsi:type="dc:Point" x="832" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="798" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="1092" y="837" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1078" y="892" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">
+ <di:waypoint xsi:type="dc:Point" x="962" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="1025" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="1025" y="212" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="212" />
+ <di:waypoint xsi:type="dc:Point" x="19" y="382" />
+ <di:waypoint xsi:type="dc:Point" x="922" y="382" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="187" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="644" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="855" y="862" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ExclusiveGateway_226">
+ <di:waypoint xsi:type="dc:Point" x="1012" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="1117" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="1117" y="837" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1090" y="798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="1117" y="887" />
+ <di:waypoint xsi:type="dc:Point" x="1117" y="958" />
+ <di:waypoint xsi:type="dc:Point" x="34" y="958" />
+ <di:waypoint xsi:type="dc:Point" x="34" y="1103" />
+ <di:waypoint xsi:type="dc:Point" x="56" y="1103" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="262" y="958" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="589" y="1098" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="578" y="1153" width="71" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_227">
+ <di:waypoint xsi:type="dc:Point" x="1092" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="1029" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="1029" y="942" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="942" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="1246" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="1246" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="1148" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="976" y="912" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="639" y="1123" />
+ <di:waypoint xsi:type="dc:Point" x="1028" y="1123" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="1123" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="639" y="1123" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="1123" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="1067" />
+ <di:waypoint xsi:type="dc:Point" x="664" y="1038" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="1038" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="1044" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="461" y="995" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_255">
+ <di:waypoint xsi:type="dc:Point" x="427" y="1035" />
+ <di:waypoint xsi:type="dc:Point" x="461" y="1035" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="446" y="1035" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_227">
+ <di:waypoint xsi:type="dc:Point" x="561" y="1035" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="1035" />
+ <di:waypoint xsi:type="dc:Point" x="614" y="1098" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="614" y="1040" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="27" y="1464" width="699" height="159" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">
+ <dc:Bounds x="47" y="1515" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="53" y="1560" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">
+ <dc:Bounds x="391" y="1493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
+ <dc:Bounds x="565" y="1515" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="583" y="1551" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="708" y="1514" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="726" y="1550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
+ <dc:Bounds x="880" y="1514" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="1555" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189">
+ <di:waypoint xsi:type="dc:Point" x="744" y="1532" />
+ <di:waypoint xsi:type="dc:Point" x="818" y="1532" />
+ <di:waypoint xsi:type="dc:Point" x="818" y="1532" />
+ <di:waypoint xsi:type="dc:Point" x="880" y="1532" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="833" y="1532" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0a0hroy_di" bpmnElement="ExclusiveGateway_0a0hroy" isMarkerVisible="true">
+ <dc:Bounds x="413" y="588" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="638" width="84" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0mnb4d7_di" bpmnElement="Task_08csf14">
+ <dc:Bounds x="212" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1shi2a6_di" bpmnElement="Task_18r7u02">
+ <dc:Bounds x="552" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0zvct4i_di" bpmnElement="Task_01ajtiy">
+ <dc:Bounds x="747" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0djpj3r_di" bpmnElement="SequenceFlow_0djpj3r">
+ <di:waypoint xsi:type="dc:Point" x="312" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="589" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="532" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0uvarlv_di" bpmnElement="ExclusiveGateway_0uvarlv" isMarkerVisible="true">
+ <dc:Bounds x="921" y="588" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="907" y="638" width="78" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_185bo77_di" bpmnElement="SequenceFlow_185bo77">
+ <di:waypoint xsi:type="dc:Point" x="463" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="692" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="692" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="921" y="613" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="613" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_111l1he_di" bpmnElement="SequenceFlow_111l1he">
+ <di:waypoint xsi:type="dc:Point" x="463" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="553" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ca4brn_di" bpmnElement="SequenceFlow_0ca4brn">
+ <di:waypoint xsi:type="dc:Point" x="652" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="693" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="693" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="747" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="708" y="547" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19r2uus_di" bpmnElement="SequenceFlow_19r2uus">
+ <di:waypoint xsi:type="dc:Point" x="847" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="946" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="946" y="588" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="532" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p0v6yk_di" bpmnElement="SequenceFlow_1p0v6yk">
+ <di:waypoint xsi:type="dc:Point" x="946" y="638" />
+ <di:waypoint xsi:type="dc:Point" x="946" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="47" y="724" />
+ <di:waypoint xsi:type="dc:Point" x="47" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="803" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="507" y="732" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03i4czf_di" bpmnElement="SequenceFlow_03i4czf">
+ <di:waypoint xsi:type="dc:Point" x="971" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="1036" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="1036" y="709" />
+ <di:waypoint xsi:type="dc:Point" x="30" y="709" />
+ <di:waypoint xsi:type="dc:Point" x="30" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="466" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="683" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1yozzae_di" bpmnElement="ExclusiveGateway_1yozzae" isMarkerVisible="true">
+ <dc:Bounds x="278" y="93" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="267" y="143" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11er1t8_di" bpmnElement="SequenceFlow_11er1t8">
+ <di:waypoint xsi:type="dc:Point" x="328" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="538" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="357" y="91.50148837900852" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ggp8wz_di" bpmnElement="SequenceFlow_0ggp8wz">
+ <di:waypoint xsi:type="dc:Point" x="303" y="93" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="-11" />
+ <di:waypoint xsi:type="dc:Point" x="1158" y="-11" />
+ <di:waypoint xsi:type="dc:Point" x="1177" y="1105" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="723" y="-26" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188">
+ <di:waypoint xsi:type="dc:Point" x="491" y="1533" />
+ <di:waypoint xsi:type="dc:Point" x="565" y="1533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="528" y="1518" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="_BPMNShape_ScriptTask_281">
+ <di:waypoint xsi:type="dc:Point" x="83" y="1533" />
+ <di:waypoint xsi:type="dc:Point" x="198" y="1533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="141" y="1518" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1938vz9_di" bpmnElement="ExclusiveGateway_1938vz9" isMarkerVisible="true">
+ <dc:Bounds x="921.561377245509" y="357" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="407" width="90" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_17dmaj7_di" bpmnElement="PrepareSDNCDeactivateRequest">
+ <dc:Bounds x="204" y="281" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0ouj5y6_di" bpmnElement="CallSDNCDeactivate">
+ <dc:Bounds x="401" y="280" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1fmh02z_di" bpmnElement="PostProcessSDNCDeactivateRequest">
+ <dc:Bounds x="613" y="280" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ugalf8_di" bpmnElement="SequenceFlow_0ugalf8">
+ <di:waypoint xsi:type="dc:Point" x="304" y="321" />
+ <di:waypoint xsi:type="dc:Point" x="401" y="320" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="353" y="295.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n78x37_di" bpmnElement="SequenceFlow_0n78x37">
+ <di:waypoint xsi:type="dc:Point" x="501" y="320" />
+ <di:waypoint xsi:type="dc:Point" x="613" y="320" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="295" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06rm0hg_di" bpmnElement="SequenceFlow_06rm0hg">
+ <di:waypoint xsi:type="dc:Point" x="713" y="320" />
+ <di:waypoint xsi:type="dc:Point" x="947" y="320" />
+ <di:waypoint xsi:type="dc:Point" x="947" y="357" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="830" y="305" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n58kg1_di" bpmnElement="SequenceFlow_0n58kg1">
+ <di:waypoint xsi:type="dc:Point" x="972" y="382" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="382" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="466" />
+ <di:waypoint xsi:type="dc:Point" x="14" y="466" />
+ <di:waypoint xsi:type="dc:Point" x="14" y="613" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="613" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="444" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0unumxv_di" bpmnElement="SequenceFlow_0unumxv">
+ <di:waypoint xsi:type="dc:Point" x="947" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="947" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="32" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="32" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="211" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="506" y="493" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1iufuuu_di" bpmnElement="SequenceFlow_1iufuuu">
+ <di:waypoint xsi:type="dc:Point" x="287" y="1177" />
+ <di:waypoint xsi:type="dc:Point" x="328" y="1177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="308" y="1162" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1l4n37b_di" bpmnElement="SequenceFlow_1l4n37b">
+ <di:waypoint xsi:type="dc:Point" x="428" y="1177" />
+ <di:waypoint xsi:type="dc:Point" x="469" y="1176" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="449" y="1161.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0qvylv2_di" bpmnElement="PrepareSDNCUnassignRequest">
+ <dc:Bounds x="187" y="1138" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1stidyk_di" bpmnElement="CallSDNCAdapterUnassign">
+ <dc:Bounds x="328" y="1137" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ub9z2k_di" bpmnElement="PostProcessSDNCUnassignRequest">
+ <dc:Bounds x="469" y="1136" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1h87hhh_di" bpmnElement="ExclusiveGateway_1h87hhh" isMarkerVisible="true">
+ <dc:Bounds x="55.989141164856846" y="1077.9259624876604" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="41" y="1127.9259624876604" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rpg6ac_di" bpmnElement="SequenceFlow_1rpg6ac">
+ <di:waypoint xsi:type="dc:Point" x="81" y="1078" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="1035" />
+ <di:waypoint xsi:type="dc:Point" x="187" y="1035" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="100" y="1010.5" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ghmax_di" bpmnElement="SequenceFlow_16ghmax">
+ <di:waypoint xsi:type="dc:Point" x="81" y="1128" />
+ <di:waypoint xsi:type="dc:Point" x="81" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="187" y="1178" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="92" y="1182" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12otwa4_di" bpmnElement="SequenceFlow_12otwa4">
+ <di:waypoint xsi:type="dc:Point" x="569" y="1176" />
+ <di:waypoint xsi:type="dc:Point" x="579" y="1176" />
+ <di:waypoint xsi:type="dc:Point" x="579" y="1123" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="1123" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="594" y="1139.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h8ve60_di" bpmnElement="SequenceFlow_1h8ve60">
+ <di:waypoint xsi:type="dc:Point" x="1128" y="1123" />
+ <di:waypoint xsi:type="dc:Point" x="1159" y="1123" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1144" y="1108" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lrbhgj_di" bpmnElement="SetSuccessfulRollbackStatus">
+ <dc:Bounds x="1028" y="1083" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_02fx6z6_di" bpmnElement="SequenceFlow_02fx6z6">
+ <di:waypoint xsi:type="dc:Point" x="298" y="1533" />
+ <di:waypoint xsi:type="dc:Point" x="391" y="1533" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="1518" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0cd144f_di" bpmnElement="SetFailedRollbackStatus">
+ <dc:Bounds x="198" y="1493" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ahc44p_di" bpmnElement="ExclusiveGateway_0ahc44p" isMarkerVisible="true">
+ <dc:Bounds x="465.5588822355289" y="837" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="500" y="805" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gcfdej_di" bpmnElement="SequenceFlow_1gcfdej">
+ <di:waypoint xsi:type="dc:Point" x="516" y="862" />
+ <di:waypoint xsi:type="dc:Point" x="594" y="862" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="837.0195010054398" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17ne2iz_di" bpmnElement="SequenceFlow_17ne2iz">
+ <di:waypoint xsi:type="dc:Point" x="491" y="887" />
+ <di:waypoint xsi:type="dc:Point" x="491" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="-38" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="-38" y="1347" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="459" y="884.8446601941747" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17it51d_di" bpmnElement="SequenceFlow_17it51d">
+ <di:waypoint xsi:type="dc:Point" x="362" y="1347" />
+ <di:waypoint xsi:type="dc:Point" x="1078" y="1347" />
+ <di:waypoint xsi:type="dc:Point" x="1078" y="1163" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="720" y="1332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fvuowt_di" bpmnElement="SequenceFlow_0fvuowt">
+ <di:waypoint xsi:type="dc:Point" x="204" y="1347" />
+ <di:waypoint xsi:type="dc:Point" x="262" y="1347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="233" y="1332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0i5a02m_di" bpmnElement="Task_0k9gnp2">
+ <dc:Bounds x="262" y="1307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_008e45v_di" bpmnElement="Task_1sqxedz">
+ <dc:Bounds x="104" y="1308" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08aruzz_di" bpmnElement="SequenceFlow_08aruzz">
+ <di:waypoint xsi:type="dc:Point" x="362" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="491" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="491" y="837" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="778" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeRollback.bpmn
new file mode 100644
index 0000000000..a762b7ecd7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeRollback.bpmn
@@ -0,0 +1,247 @@
+<?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.4.0">
+ <bpmn:process id="DoCreateVfModuleVolumeRollback" name="DoCreateVfModuleVolumeRollback" isExecutable="true">
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeRollback = new DoCreateVfModuleVolumeRollback()
+doCreateVfModuleVolumeRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:startEvent id="StartEvent_0128tti" name="Fault Start">
+ <bpmn:outgoing>SequenceFlow_0qreiaa</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_128ycfs" name="Is RollBack On?" default="SequenceFlow_1wberw3">
+ <bpmn:incoming>SequenceFlow_1xah9es</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11y7faf</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1wberw3</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03qps8q" name="Is Vnf Ok?" default="SequenceFlow_10dawse">
+ <bpmn:incoming>SequenceFlow_11y7faf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0h7k68j</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_10dawse</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:callActivity id="CallActivity_03pmk7v" name="Call VNF Adapter Rollback" calledElement="vnfAdapterRestV1">
+ <bpmn:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DCVFMODVOLRBK_rollbackVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0h7k68j</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0bv04qn</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0h7k68j" sourceRef="ExclusiveGateway_03qps8q" targetRef="CallActivity_03pmk7v">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMODVOLRBK_isCreateVnfRollbackNeeded") == "true"}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="ScriptTask_1numqm0" name="Delete Volume Group" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0bv04qn</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_17k6oyz</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13nb3n0</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeRollback = new DoCreateVfModuleVolumeRollback()
+doCreateVfModuleVolumeRollback.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0bv04qn" sourceRef="CallActivity_03pmk7v" targetRef="ScriptTask_1numqm0" />
+ <bpmn:sequenceFlow id="SequenceFlow_10dawse" sourceRef="ExclusiveGateway_03qps8q" targetRef="ExclusiveGateway_1dzejtx" />
+ <bpmn:sequenceFlow id="SequenceFlow_13nb3n0" sourceRef="ScriptTask_1numqm0" targetRef="EndEvent_11duf9p" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1dzejtx" name="Is AAI Ok?" default="SequenceFlow_1do0853">
+ <bpmn:incoming>SequenceFlow_10dawse</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17k6oyz</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1do0853</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_17k6oyz" sourceRef="ExclusiveGateway_1dzejtx" targetRef="ScriptTask_1numqm0">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMODVOLRBK_isAAIRollbackNeeded" ) == "true"}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1do0853" sourceRef="ExclusiveGateway_1dzejtx" targetRef="EndEvent_1ddbl39" />
+ <bpmn:endEvent id="EndEvent_1ddbl39">
+ <bpmn:incoming>SequenceFlow_1do0853</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1wberw3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_11duf9p">
+ <bpmn:incoming>SequenceFlow_13nb3n0</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_11y7faf" sourceRef="ExclusiveGateway_128ycfs" targetRef="ExclusiveGateway_03qps8q">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMODVOLRBK_backoutOnFailure") != "false"}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="ScriptTask_0uhy9lc" name="Pre process" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0qreiaa</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xah9es</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeRollback = new DoCreateVfModuleVolumeRollback()
+doCreateVfModuleVolumeRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1wberw3" sourceRef="ExclusiveGateway_128ycfs" targetRef="EndEvent_1ddbl39" />
+ <bpmn:sequenceFlow id="SequenceFlow_0qreiaa" sourceRef="StartEvent_0128tti" targetRef="ScriptTask_0uhy9lc" />
+ <bpmn:sequenceFlow id="SequenceFlow_1xah9es" sourceRef="ScriptTask_0uhy9lc" targetRef="ExclusiveGateway_128ycfs" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeRollback">
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="293" y="165" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="441" y="220" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="326" y="242" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="602" y="242" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="620" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="362" y="260" />
+ <di:waypoint xsi:type="dc:Point" x="441" y="260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="404" y="260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="541" y="260" />
+ <di:waypoint xsi:type="dc:Point" x="602" y="260" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="576" y="260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_0128tti_di" bpmnElement="StartEvent_0128tti">
+ <dc:Bounds x="173" y="-93" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="167" y="-52" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_128ycfs_di" bpmnElement="ExclusiveGateway_128ycfs" isMarkerVisible="true">
+ <dc:Bounds x="465" y="-100" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="450" y="-50" width="79" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03qps8q_di" bpmnElement="ExclusiveGateway_03qps8q" isMarkerVisible="true">
+ <dc:Bounds x="607" y="-100" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="-50" width="52" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_03pmk7v_di" bpmnElement="CallActivity_03pmk7v">
+ <dc:Bounds x="786" y="-115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h7k68j_di" bpmnElement="SequenceFlow_0h7k68j">
+ <di:waypoint xsi:type="dc:Point" x="657" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="786" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="-90" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1numqm0_di" bpmnElement="ScriptTask_1numqm0">
+ <dc:Bounds x="998" y="-115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bv04qn_di" bpmnElement="SequenceFlow_0bv04qn">
+ <di:waypoint xsi:type="dc:Point" x="886" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="998" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="952" y="-75" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_10dawse_di" bpmnElement="SequenceFlow_10dawse">
+ <di:waypoint xsi:type="dc:Point" x="632" y="-50" />
+ <di:waypoint xsi:type="dc:Point" x="632" y="40" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="40" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="648" y="-5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13nb3n0_di" bpmnElement="SequenceFlow_13nb3n0">
+ <di:waypoint xsi:type="dc:Point" x="1098" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="1151" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1125" y="-90" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1dzejtx_di" bpmnElement="ExclusiveGateway_1dzejtx" isMarkerVisible="true">
+ <dc:Bounds x="811" y="15" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="65" width="53" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17k6oyz_di" bpmnElement="SequenceFlow_17k6oyz">
+ <di:waypoint xsi:type="dc:Point" x="861" y="40" />
+ <di:waypoint xsi:type="dc:Point" x="1048" y="40" />
+ <di:waypoint xsi:type="dc:Point" x="1048" y="-35" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="955" y="25" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1do0853_di" bpmnElement="SequenceFlow_1do0853">
+ <di:waypoint xsi:type="dc:Point" x="836" y="65" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="99" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="851" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0le8wga_di" bpmnElement="EndEvent_1ddbl39">
+ <dc:Bounds x="818" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="836" y="135" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1iibjyo_di" bpmnElement="EndEvent_11duf9p">
+ <dc:Bounds x="1151" y="-93" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1169" y="-57" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11y7faf_di" bpmnElement="SequenceFlow_11y7faf">
+ <di:waypoint xsi:type="dc:Point" x="515" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="561" y="-90" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0uhy9lc_di" bpmnElement="ScriptTask_0uhy9lc">
+ <dc:Bounds x="288" y="-115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wberw3_di" bpmnElement="SequenceFlow_1wberw3">
+ <di:waypoint xsi:type="dc:Point" x="490" y="-50" />
+ <di:waypoint xsi:type="dc:Point" x="490" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="818" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="23.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qreiaa_di" bpmnElement="SequenceFlow_0qreiaa">
+ <di:waypoint xsi:type="dc:Point" x="209" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="288" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="249" y="-100" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xah9es_di" bpmnElement="SequenceFlow_1xah9es">
+ <di:waypoint xsi:type="dc:Point" x="388" y="-75" />
+ <di:waypoint xsi:type="dc:Point" x="465" y="-75" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="-100" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </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
new file mode 100644
index 0000000000..ac48776c95
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
@@ -0,0 +1,362 @@
+<?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:process id="DoCreateVfModuleVolumeV2" name="DoCreateVfModuleVolumeV2" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wi1cf9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiCloudRegion" name="Call REST AAI Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dpt7ul</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_callRestAaiCloudRegion" targetRef="ScriptTask_callRestAaiQueryGenericVnf" />
+ <bpmn2:scriptTask id="ScriptTask_createVolGrpExistsException" name="Build Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpName404No</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('buildWorkflowException', execution, 2500, "Volume group name already exists in the system.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_createVolGrpExistsException" targetRef="EndEvent_6" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_aaiReturnCode404" name="AAI Return Code is 404?" default="SequenceFlow_volGrpName404No">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_volGrpName404Yes</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_volGrpName404No</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404Yes" name="Yes" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_callRestAaiCreateVolumeGrp">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{DCVFMODVOLV2_AaiReturnCode == '404'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404No" name="No" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_createVolGrpExistsException" />
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryGenericVnf" name="Call REST AAI Query Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTQueryAAIGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_callRestAaiQueryGenericVnf" targetRef="ScriptTask_callRestAaiQueryVolGrpName" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_catchAaiError" name="" attachedToRef="ScriptTask_callRestAaiQueryVolGrpName">
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="BoundaryEvent_catchAaiError" targetRef="ExclusiveGateway_aaiReturnCode404" />
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryVolGrpName" name="Call REST AAI Query Volume Grp Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestAaiQueryVolGrpName" targetRef="ExclusiveGateway_aaiReturnCode404" />
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiCreateVolumeGrp" name="Call REST AAI Create Volume Group" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_volGrpName404Yes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTCreateAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_callRestAaiCreateVolumeGrp" targetRef="ScriptTask_prepareVnfAdapterCreate" />
+ <bpmn2:callActivity id="CallActivity_callVnfAdapterCreate" name="Call VNF Adapter Create" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMODVOLV2_createVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DCVFMODVOLV2_createVnfAResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="VNFREST_vnfAdapterStatusCode" target="DCVFMODVOLV2_createVnfAReturnCode" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qwurc5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiRequeryVolGrpNm" name="Call REST AAI Requery Volume Group Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1gbt2n5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="ScriptTask_callRestAaiRequeryVolGrpNm" targetRef="ScriptTask_callRestAaiVolumeGrp" />
+ <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiVolumeGrp" name="Call REST AAI Update Volume Group" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('callRESTUpdateCreatedVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_callRestAaiVolumeGrp" targetRef="ScriptTask_prepareDbInfraRequest" />
+ <bpmn2:endEvent id="EndEvent_1" name="End">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_prepareVnfAdapterCreate" name="Prepare VNF Adapter Create Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('prepareVnfAdapterCreateRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_prepareVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCreate" />
+ <bpmn2:startEvent id="StartEvent_doCreateVfModuleVolume" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_doCreateVfModuleVolume" targetRef="ScriptTask_preProcessRequest" />
+ <bpmn2:endEvent id="EndEvent_6" name="End">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="Task_07psich" name="Validate VNF Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qwurc5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gbt2n5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
+doCreateVfModuleVolumeV2.executeMethod('validateVnfResponse', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </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: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>
+ </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_1dpt7ul" sourceRef="Task_0qbm5cz" targetRef="ScriptTask_callRestAaiCloudRegion" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeV2">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_doCreateVfModuleVolume">
+ <dc:Bounds x="270" y="128" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="276" y="169" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds x="369" y="106" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_287" bpmnElement="ScriptTask_callRestAaiCloudRegion">
+ <dc:Bounds x="768" y="106" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="ScriptTask_callRestAaiQueryVolGrpName">
+ <dc:Bounds x="1045" y="106" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_247" bpmnElement="ExclusiveGateway_aaiReturnCode404" isMarkerVisible="true">
+ <dc:Bounds x="1242" y="121" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1224" y="176" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="ScriptTask_callRestAaiCreateVolumeGrp">
+ <dc:Bounds x="256" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="ScriptTask_prepareVnfAdapterCreate">
+ <dc:Bounds x="420" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_32" bpmnElement="CallActivity_callVnfAdapterCreate">
+ <dc:Bounds x="576" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <dc:Bounds x="857" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="ScriptTask_callRestAaiVolumeGrp">
+ <dc:Bounds x="995" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_294" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds x="1142" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1283" y="328" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1292" y="369" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="306" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="369" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="131" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_volGrpName404Yes" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_289">
+ <di:waypoint xsi:type="dc:Point" x="1267" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="1267" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="306" y="307" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="232" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ScriptTask_290">
+ <di:waypoint xsi:type="dc:Point" x="356" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="420" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_CallActivity_32">
+ <di:waypoint xsi:type="dc:Point" x="520" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="548" y="455" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_287" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="868" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="911" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="132" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="ScriptTask_createVolGrpExistsException">
+ <dc:Bounds x="1355" y="106" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_EndEvent_241">
+ <di:waypoint xsi:type="dc:Point" x="1455" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="1493" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1474" y="131" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_BoundaryEvent_62" targetElement="_BPMNShape_ExclusiveGateway_247">
+ <di:waypoint xsi:type="dc:Point" x="1145" y="88" />
+ <di:waypoint xsi:type="dc:Point" x="1145" y="59" />
+ <di:waypoint xsi:type="dc:Point" x="1267" y="59" />
+ <di:waypoint xsi:type="dc:Point" x="1267" y="121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1206" y="44" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_volGrpName404No" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_296">
+ <di:waypoint xsi:type="dc:Point" x="1292" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="1355" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1320" y="146" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_ScriptTask_293">
+ <di:waypoint xsi:type="dc:Point" x="957" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="976" y="332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_ScriptTask_294">
+ <di:waypoint xsi:type="dc:Point" x="1095" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="1142" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1119" y="332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_294" targetElement="_BPMNShape_EndEvent_226">
+ <di:waypoint xsi:type="dc:Point" x="1242" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="1283" y="346" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1263" y="332" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="ScriptTask_callRestAaiQueryGenericVnf">
+ <dc:Bounds x="911" y="106" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_288">
+ <di:waypoint xsi:type="dc:Point" x="1011" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="131" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_62" bpmnElement="BoundaryEvent_catchAaiError">
+ <dc:Bounds x="1127" y="88" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1145" y="129" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_247">
+ <di:waypoint xsi:type="dc:Point" x="1145" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1194" y="131" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_6">
+ <dc:Bounds x="1493" y="128" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1502" y="169" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00lua86_di" bpmnElement="Task_07psich">
+ <dc:Bounds x="716" y="307" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qwurc5_di" bpmnElement="SequenceFlow_1qwurc5">
+ <di:waypoint xsi:type="dc:Point" x="676" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="716" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="696" y="322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gbt2n5_di" bpmnElement="SequenceFlow_1gbt2n5">
+ <di:waypoint xsi:type="dc:Point" x="816" y="347" />
+ <di:waypoint xsi:type="dc:Point" x="857" y="347" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="623" y="121" width="0" 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="768" y="146" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="754" y="121" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
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
new file mode 100644
index 0000000000..dacce53963
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
@@ -0,0 +1,635 @@
+<?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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVnf" name="DoCreateVnf" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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>
+ <bpmn2:outgoing>vnfExistNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="vnfExistYes" name="Yes" sourceRef="vnfExist" targetRef="vnfExistWorkflowException" />
+ <bpmn2:sequenceFlow id="vnfExistNo" name="No" sourceRef="vnfExist" targetRef="prepareCreateGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator" ) == false && execution.getVariable("GENGV_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="callGetVnf" name="Get&#10;&#10;Generic Vnf" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_vnfName" target="GENGV_vnfName" />
+ <camunda:in source="DoCVNF_type" target="GENGV_type" />
+ <camunda:out source="GENGV_vnf" target="CRTVI_genericVnf" />
+ <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator" />
+ <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>VnfNameSpecified1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callGetVnf" targetRef="vnfExist" />
+ <bpmn2:scriptTask id="vnfExistWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>vnfExistYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+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" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="prepareCreateGenericVnf" name="&#10;AAI&#10;Create&#10;(generic vnf)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>vnfExistNo</bpmn2:incoming>
+ <bpmn2:incoming>VnfNameNotSpecified1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.createGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="postProcessCreateGenericVnf" />
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="processJavaError" targetRef="EndEvent_4" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SdncInteractionNotEnabled</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0bj7c4s</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="preProcessSDNCAssignRequest" targetRef="callSDNCAdapterVNFTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="callSDNCAdapterVNFTopologyAssign" targetRef="postProcessSDNCAssignRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="preProcessSDNCActivateRequest" targetRef="callSDNCAdapterVNFTopologyActivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="callSDNCAdapterVNFTopologyActivate" targetRef="postProcessSDNCActivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCActivateRequest" targetRef="Task_053tb0h" />
+ <bpmn2:scriptTask id="preProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SdncInteractionEnabled</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterVNFTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_assignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DoCVNF_assignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCAssignRequest" name="PostProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lnh79j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
+
+def createVnfInfra = new DoCreateVnf()
+createVnfInfra.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="preProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1q1poly</bpmn2:incoming>
+ <bpmn2:incoming>VnfNameSpecified2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterVNFTopologyActivate" name="Call SDNC Adapter VNF Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-reqeuest-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DoCVNF_activateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DoCVNF_assignSDNCAdapterResponse")
+
+def createVnfInfra = new DoCreateVnf()
+createVnfInfra.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_045rm8i" name="Is SDNC Interaction Enabled?" default="SdncInteractionNotEnabled">
+ <bpmn2:incoming>SequenceFlow_1gc18ih</bpmn2:incoming>
+ <bpmn2:outgoing>SdncInteractionEnabled</bpmn2:outgoing>
+ <bpmn2:outgoing>SdncInteractionNotEnabled</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SdncInteractionEnabled" name="Yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SdncInteractionNotEnabled" name="No" sourceRef="ExclusiveGateway_045rm8i" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1gc18ih" sourceRef="postProcessCreateGenericVnf" targetRef="ExclusiveGateway_045rm8i" />
+ <bpmn2:scriptTask id="postProcessCreateGenericVnf" name="PostProcess Create Generic Vnf" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gc18ih</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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:outgoing>VnfNameNotSpecified1</bpmn2:outgoing>
+ <bpmn2:outgoing>VnfNameSpecified1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="VnfNameNotSpecified1" name="No" sourceRef="ExclusiveGateway_0j73e7c" targetRef="prepareCreateGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_vnfName" ) == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="VnfNameSpecified1" name="Yes" sourceRef="ExclusiveGateway_0j73e7c" targetRef="callGetVnf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h9jdgr" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVNFTopologyGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14xac2y" sourceRef="CallSDNCAdapterVNFTopologyGet" targetRef="PostProcessSDNCGetRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1q1poly" sourceRef="PostProcessSDNCGetRequest" targetRef="preProcessSDNCActivateRequest" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0qnhlm1" name="Vnf-name specified?" default="VnfNameSpecified2">
+ <bpmn2:incoming>SequenceFlow_0lnh79j</bpmn2:incoming>
+ <bpmn2:outgoing>VnfNameNotSpecified2</bpmn2:outgoing>
+ <bpmn2:outgoing>VnfNameSpecified2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lnh79j" sourceRef="postProcessSDNCAssignRequest" targetRef="ExclusiveGateway_0qnhlm1" />
+ <bpmn2:sequenceFlow id="VnfNameNotSpecified2" name="No" sourceRef="ExclusiveGateway_0qnhlm1" targetRef="PreProcessSDNCGetRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoCVNF_vnfName" ) == null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="VnfNameSpecified2" name="Yes" sourceRef="ExclusiveGateway_0qnhlm1" targetRef="preProcessSDNCActivateRequest" />
+ <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC Get Request" scriptFormat="groovy">
+ <bpmn2:incoming>VnfNameNotSpecified2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h9jdgr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.preProcessSDNCGetRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallSDNCAdapterVNFTopologyGet" name="Call SDNC Adapter VNF Topology Get" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_getSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DoCVNF_getSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1h9jdgr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14xac2y</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC Get Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14xac2y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q1poly</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("DoCVNF_getSDNCAdapterResponse")
+
+def createVnfInfra = new DoCreateVnf()
+createVnfInfra.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bj7c4s" sourceRef="UpdateAAIOrchestrationStatus" targetRef="EndEvent_3" />
+ <bpmn2:callActivity id="UpdateAAIOrchestrationStatus" name="Update AAI Orchestration Status to Active" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0nhsdmj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bj7c4s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nhsdmj" sourceRef="Task_053tb0h" targetRef="UpdateAAIOrchestrationStatus" />
+ <bpmn2:scriptTask id="Task_053tb0h" name="Prepare Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0nhsdmj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnf = new DoCreateVnf()
+doCreateVnf.prepUpdateAAIGenericVnf(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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="96" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="114" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="216" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="165" y="240" width="6" 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" />
+ <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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">
+ <dc:Bounds x="720" y="288" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_232" bpmnElement="vnfExist" isMarkerVisible="true">
+ <dc:Bounds x="854" y="302" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="332" width="114" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_60" targetElement="_BPMNShape_ExclusiveGateway_232">
+ <di:waypoint xsi:type="dc:Point" x="820" y="328" />
+ <di:waypoint xsi:type="dc:Point" x="854" y="327" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="804" y="330" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="vnfExistWorkflowException">
+ <dc:Bounds x="926" y="367" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="prepareCreateGenericVnf">
+ <dc:Bounds x="959" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="vnfExistYes" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_299">
+ <di:waypoint xsi:type="dc:Point" x="879" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="367" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="vnfExistNo" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_300">
+ <di:waypoint xsi:type="dc:Point" x="879" y="302" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="884" y="254" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_227" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1092" y="389" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1110" y="430" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_299" targetElement="_BPMNShape_EndEvent_227">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="407" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="407" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="407" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1765" y="537" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1783" y="578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="ScriptTask_0y55cyz_di">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1146" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1057.5" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="109" y="668" width="313" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">
+ <dc:Bounds x="133" y="735" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="776" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
+ <dc:Bounds x="216" y="713" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">
+ <dc:Bounds x="361" y="735" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="776" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_76" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="169" y="753" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="190" y="753" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_234">
+ <di:waypoint xsi:type="dc:Point" x="316" y="753" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="753" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="753" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="306" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="446" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="1100" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1128" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="1256" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1304" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1280" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="1404" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1445" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1425" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="preProcessSDNCAssignRequest">
+ <dc:Bounds x="206" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="callSDNCAdapterVNFTopologyAssign">
+ <dc:Bounds x="346" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="postProcessSDNCAssignRequest">
+ <dc:Bounds x="493" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="preProcessSDNCActivateRequest">
+ <dc:Bounds x="1000" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="callSDNCAdapterVNFTopologyActivate">
+ <dc:Bounds x="1156" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCActivateRequest">
+ <dc:Bounds x="1304" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045rm8i_di" bpmnElement="ExclusiveGateway_045rm8i" isMarkerVisible="true">
+ <dc:Bounds x="1758" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1756" y="163" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SdncInteractionEnabled">
+ <di:waypoint xsi:type="dc:Point" x="1783" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1783" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="460" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SdncInteractionNotEnabled">
+ <di:waypoint xsi:type="dc:Point" x="1783" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1783" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="1783" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="1783" y="537" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1812" y="431.09791911764705" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gc18ih_di" bpmnElement="SequenceFlow_1gc18ih">
+ <di:waypoint xsi:type="dc:Point" x="1246" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1758" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1457" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y55cyz_di" bpmnElement="postProcessCreateGenericVnf">
+ <dc:Bounds x="1146" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0j73e7c_di" bpmnElement="ExclusiveGateway_0j73e7c" isMarkerVisible="true">
+ <dc:Bounds x="646" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="653" y="184" width="51" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k2oavy_di" bpmnElement="VnfNameNotSpecified1">
+ <di:waypoint xsi:type="dc:Point" x="696" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="959" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="821.0502092050209" y="215" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pwgmrg_di" bpmnElement="VnfNameSpecified1">
+ <di:waypoint xsi:type="dc:Point" x="671" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="671" y="328" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="328" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="286.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h9jdgr_di" bpmnElement="SequenceFlow_1h9jdgr">
+ <di:waypoint xsi:type="dc:Point" x="777" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="788" y="678" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14xac2y_di" bpmnElement="SequenceFlow_14xac2y">
+ <di:waypoint xsi:type="dc:Point" x="899" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="678" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q1poly_di" bpmnElement="SequenceFlow_1q1poly">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="1050" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="1050" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1038" y="678" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0qnhlm1_di" bpmnElement="ExclusiveGateway_0qnhlm1" isMarkerVisible="true">
+ <dc:Bounds x="625" y="530" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="624" y="495" width="51" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lnh79j_di" bpmnElement="SequenceFlow_0lnh79j">
+ <di:waypoint xsi:type="dc:Point" x="593" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="609" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mh1y3w_di" bpmnElement="VnfNameNotSpecified2">
+ <di:waypoint xsi:type="dc:Point" x="650" y="580" />
+ <di:waypoint xsi:type="dc:Point" x="650" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="677" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="622" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_175qbtt_di" bpmnElement="VnfNameSpecified2">
+ <di:waypoint xsi:type="dc:Point" x="675" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1000" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="829" y="530" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1cpb0sg_di" bpmnElement="PreProcessSDNCGetRequest">
+ <dc:Bounds x="677" y="653" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0h8tpji_di" bpmnElement="CallSDNCAdapterVNFTopologyGet">
+ <dc:Bounds x="799" y="653" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1orism0_di" bpmnElement="PostProcessSDNCGetRequest">
+ <dc:Bounds x="926" y="653" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bj7c4s_di" bpmnElement="SequenceFlow_0bj7c4s">
+ <di:waypoint xsi:type="dc:Point" x="1700" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1765" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1733" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0a4a9lx_di" bpmnElement="UpdateAAIOrchestrationStatus">
+ <dc:Bounds x="1600" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nhsdmj_di" bpmnElement="SequenceFlow_0nhsdmj">
+ <di:waypoint xsi:type="dc:Point" x="1545" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1600" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1573" y="540" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0aonzix_di" bpmnElement="Task_053tb0h">
+ <dc:Bounds x="1445" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
new file mode 100644
index 0000000000..d817f5703b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+ <bpmn:process id="DoCreateVnfAndModules" name="DoCreateVnfAndModules" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_0o4vuzt</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="PreProcessRequest" name="PreProcess Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0o4vuzt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xd3ri5</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CreateBaseVfModule" name="Create Base VF Module" calledElement="DoCreateVfModule">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="baseVfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleType" target="vfModuleType" />
+ <camunda:in source="volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="baseVfModuleId" target="vfModuleId" />
+ <camunda:in source="baseVfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:out source="vfModuleId" target="createdVfModuleId" />
+ <camunda:out source="vfModuleOutputParams" target="createdVfModuleOutputParams" />
+ <camunda:out source="rollbackData" target="DCVAM_baseRollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="false" target="usePreload" />
+ <camunda:in source="aLaCarte" target="aLaCarte" />
+ <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0o4vuzt" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
+ <bpmn:sequenceFlow id="SequenceFlow_1xd3ri5" sourceRef="PreProcessRequest" targetRef="QueryCatalogDB" />
+ <bpmn:callActivity id="CreateAddOnVfModule" name="Create Add-On VF Module" calledElement="DoCreateVfModule">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="addOnVfModuleName" target="vfModuleName" />
+ <camunda:in source="vfModuleType" target="vfModuleType" />
+ <camunda:in source="addOnVfModuleId" target="vfModuleId" />
+ <camunda:in source="volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="addOnVfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:out source="vfModuleId" target="createdVfModuleId" />
+ <camunda:out source="vfModuleOutputParameters" target="createdVfModuleOutputParameters" />
+ <camunda:out source="rollbackData" target="DCVAM_addOnRollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="false" target="usePreload" />
+ <camunda:in source="aLaCarte" target="aLaCarte" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1lh21yl</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1llbx0k</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1lfmdks" name="Validate Create Add-On VF Module Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1llbx0k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mguf2m</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_0v6povc">
+ <bpmn:incoming>SequenceFlow_132bohl</bpmn:incoming>
+ <bpmn:terminateEventDefinition />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1llbx0k" sourceRef="CreateAddOnVfModule" targetRef="Task_1lfmdks" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1vyqr5o" name="Are there more add-on modules?" default="SequenceFlow_132bohl">
+ <bpmn:extensionElements>
+ <camunda:properties>
+ <camunda:property />
+ </camunda:properties>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1a6wyuu</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0j52dxv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_132bohl</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0jz6bqn</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_132bohl" name="No" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="EndEvent_0v6povc" />
+ <bpmn:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfInputParameters" target="vnfInputParameters" />
+ <camunda:in source="productFamilyId" target="productFamilyId" />
+ <camunda:out source="vnfId" target="vnfId" />
+ <camunda:out source="vnfOutputParams" target="vnfOutputParams" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="vnfName" target="vnfName" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" />
+ <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_19ohb1a</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07u8e3l</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="PreProcessAddOnModule" name="PreProcess Add-On Module" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0jz6bqn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12x4dvf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.preProcessAddOnModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="QueryCatalogDB" name="Query Catalog DB for VF Modules" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1xd3ri5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_19ohb1a</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1hx9s0y" name="Less than initialCount?" default="SequenceFlow_1vrogpr">
+ <bpmn:incoming>SequenceFlow_1mguf2m</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_12x4dvf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0kld3qt</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1vrogpr</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0jz6bqn" name="yes" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="PreProcessAddOnModule">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0kld3qt" name="yes" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="GenerateAddOnModuleName">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("instancesOfThisModuleDeployed") < execution.getVariable("initialCount")}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1mguf2m" sourceRef="Task_1lfmdks" targetRef="ExclusiveGateway_1hx9s0y" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vrogpr" name="no" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="PostProcessAddOnModule" />
+ <bpmn:sequenceFlow id="SequenceFlow_1hf7k7q" sourceRef="GenerateBaseModuleName" targetRef="CreateBaseVfModule" />
+ <bpmn:callActivity id="GenerateBaseModuleName" name="Generate Base Module Name" calledElement="GenerateVfModuleName">
+ <bpmn:extensionElements>
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="baseVfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="basePersonaModelId" target="personaModelId" />
+ <camunda:out source="vfModuleName" target="baseVfModuleName" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_07u8e3l</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hf7k7q</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="GenerateAddOnModuleName" name="Generate Add-On Module Name" calledElement="GenerateVfModuleName">
+ <bpmn:extensionElements>
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="addOnVfModuleLabel" target="vfModuleLabel" />
+ <camunda:in source="addOnPersonaModelId" target="personaModelId" />
+ <camunda:out source="vfModuleName" target="addOnVfModuleName" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0kld3qt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lh21yl</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1lh21yl" sourceRef="GenerateAddOnModuleName" targetRef="CreateAddOnVfModule" />
+ <bpmn:sequenceFlow id="SequenceFlow_12x4dvf" sourceRef="PreProcessAddOnModule" targetRef="ExclusiveGateway_1hx9s0y" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ixcnb6" sourceRef="CreateBaseVfModule" targetRef="Task_054rz9i" />
+ <bpmn:sequenceFlow id="SequenceFlow_1a6wyuu" sourceRef="Task_054rz9i" targetRef="ExclusiveGateway_1vyqr5o" />
+ <bpmn:scriptTask id="Task_054rz9i" name="Validate Create Base VF Module Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ixcnb6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1a6wyuu</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.validateBaseModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_0u7tbb2" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn:endEvent id="EndEvent_16s0a3q">
+ <bpmn:incoming>SequenceFlow_1h74w1v</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:callActivity id="CallActivity_0gtajjm" name="Call DoCreateVnfAndModulesRollback" calledElement="DoCreateVnfAndModulesRollback">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="rollbackError" target="rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_03v8mmc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yu0im2</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="PreProcessRollback" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1l0rxnh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_03v8mmc</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvam = new DoCreateVnfAndModules()
+dcvam.preProcessRollback(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="PostProcessRollback" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0yu0im2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1h74w1v</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvam = new DoCreateVnfAndModules()
+dcvam.postProcessRollback(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1l0rxnh" sourceRef="StartEvent_1nbwxby" targetRef="PreProcessRollback" />
+ <bpmn:sequenceFlow id="SequenceFlow_1h74w1v" sourceRef="PostProcessRollback" targetRef="EndEvent_16s0a3q" />
+ <bpmn:sequenceFlow id="SequenceFlow_03v8mmc" sourceRef="PreProcessRollback" targetRef="CallActivity_0gtajjm" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yu0im2" sourceRef="CallActivity_0gtajjm" targetRef="PostProcessRollback" />
+ <bpmn:startEvent id="StartEvent_1nbwxby">
+ <bpmn:outgoing>SequenceFlow_1l0rxnh</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:startEvent>
+ </bpmn:subProcess>
+ <bpmn:sequenceFlow id="SequenceFlow_19ohb1a" sourceRef="QueryCatalogDB" targetRef="CreateVNF" />
+ <bpmn:sequenceFlow id="SequenceFlow_07u8e3l" sourceRef="CreateVNF" targetRef="GenerateBaseModuleName" />
+ <bpmn:sequenceFlow id="SequenceFlow_0j52dxv" sourceRef="PostProcessAddOnModule" targetRef="ExclusiveGateway_1vyqr5o" />
+ <bpmn:scriptTask id="PostProcessAddOnModule" name="PostProcess Add-On Module" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1vrogpr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0j52dxv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.postProcessAddOnModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1t407j7" sourceRef="Task_1mrb29r" targetRef="Task_0qrf3e8" />
+ <bpmn:sequenceFlow id="SequenceFlow_0baw1tl" sourceRef="Task_0qrf3e8" targetRef="GenerateBaseModuleName" />
+ <bpmn:scriptTask id="Task_1mrb29r" name="Create Platform" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_07u8e3l</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1t407j7</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.createPlatform(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_0qrf3e8" name="Create Line-of-Business" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1t407j7</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0baw1tl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmn:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1tco8kw_di" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="256" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1sztzw8_di" bpmnElement="CreateBaseVfModule">
+ <dc:Bounds x="1239" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o4vuzt_di" bpmnElement="SequenceFlow_0o4vuzt">
+ <di:waypoint xsi:type="dc:Point" x="188" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xd3ri5_di" bpmnElement="SequenceFlow_1xd3ri5">
+ <di:waypoint xsi:type="dc:Point" x="356" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="387" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0auiwq0_di" bpmnElement="CreateAddOnVfModule">
+ <dc:Bounds x="2100" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1eeaxqn_di" bpmnElement="Task_1lfmdks">
+ <dc:Bounds x="2239" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h41bs7_di" bpmnElement="EndEvent_0v6povc">
+ <dc:Bounds x="2362" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2380" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1llbx0k_di" bpmnElement="SequenceFlow_1llbx0k">
+ <di:waypoint xsi:type="dc:Point" x="2200" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="2239" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2220" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vyqr5o_di" bpmnElement="ExclusiveGateway_1vyqr5o" isMarkerVisible="true">
+ <dc:Bounds x="1517" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1498" y="190" width="90" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_132bohl_di" bpmnElement="SequenceFlow_132bohl">
+ <di:waypoint xsi:type="dc:Point" x="1542" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1542" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="2380" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="2380" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1962" y="21" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zr4ioh_di" bpmnElement="CreateVNF">
+ <dc:Bounds x="574" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tknqn1_di" bpmnElement="PreProcessAddOnModule">
+ <dc:Bounds x="1651" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1u6qcio_di" bpmnElement="QueryCatalogDB">
+ <dc:Bounds x="418" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hx9s0y_di" bpmnElement="ExclusiveGateway_1hx9s0y" isMarkerVisible="true">
+ <dc:Bounds x="1844" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1837" y="190" width="63" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jz6bqn_di" bpmnElement="SequenceFlow_0jz6bqn">
+ <di:waypoint xsi:type="dc:Point" x="1567" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1609" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1609" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1649" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1571" y="147" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kld3qt_di" bpmnElement="SequenceFlow_0kld3qt">
+ <di:waypoint xsi:type="dc:Point" x="1869" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1869" y="89" />
+ <di:waypoint xsi:type="dc:Point" x="1952" y="89" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1886" y="96" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mguf2m_di" bpmnElement="SequenceFlow_1mguf2m">
+ <di:waypoint xsi:type="dc:Point" x="2289" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="2289" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1894" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2304" y="151" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vrogpr_di" bpmnElement="SequenceFlow_1vrogpr">
+ <di:waypoint xsi:type="dc:Point" x="1869" y="190" />
+ <di:waypoint xsi:type="dc:Point" x="1869" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1869" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1869" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1751" y="301" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1878" y="247" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hf7k7q_di" bpmnElement="SequenceFlow_1hf7k7q">
+ <di:waypoint xsi:type="dc:Point" x="1191" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1215" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0rz8zl9_di" bpmnElement="GenerateBaseModuleName">
+ <dc:Bounds x="1091" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0otq8mo_di" bpmnElement="GenerateAddOnModuleName">
+ <dc:Bounds x="1952" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lh21yl_di" bpmnElement="SequenceFlow_1lh21yl">
+ <di:waypoint xsi:type="dc:Point" x="2052" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="2100" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2076" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12x4dvf_di" bpmnElement="SequenceFlow_12x4dvf">
+ <di:waypoint xsi:type="dc:Point" x="1751" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1844" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1798" y="140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ixcnb6_di" bpmnElement="SequenceFlow_1ixcnb6">
+ <di:waypoint xsi:type="dc:Point" x="1339" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1381" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1360" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a6wyuu_di" bpmnElement="SequenceFlow_1a6wyuu">
+ <di:waypoint xsi:type="dc:Point" x="1481" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1517" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1499" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1obevnp_di" bpmnElement="Task_054rz9i">
+ <dc:Bounds x="1381" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0u7tbb2_di" bpmnElement="SubProcess_0u7tbb2" isExpanded="true">
+ <dc:Bounds x="113" y="382" width="783" height="195" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_16s0a3q_di" bpmnElement="EndEvent_16s0a3q">
+ <dc:Bounds x="843" y="460" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861" y="501" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0gtajjm_di" bpmnElement="CallActivity_0gtajjm">
+ <dc:Bounds x="508" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_12g5tld_di" bpmnElement="PreProcessRollback">
+ <dc:Bounds x="345" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1nk6apr_di" bpmnElement="PostProcessRollback">
+ <dc:Bounds x="676" y="438" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1l0rxnh_di" bpmnElement="SequenceFlow_1l0rxnh">
+ <di:waypoint xsi:type="dc:Point" x="246" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="345" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="296" y="463" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h74w1v_di" bpmnElement="SequenceFlow_1h74w1v">
+ <di:waypoint xsi:type="dc:Point" x="776" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="808" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="808" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="843" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="823" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03v8mmc_di" bpmnElement="SequenceFlow_03v8mmc">
+ <di:waypoint xsi:type="dc:Point" x="445" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="477" y="463" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yu0im2_di" bpmnElement="SequenceFlow_0yu0im2">
+ <di:waypoint xsi:type="dc:Point" x="608" y="478" />
+ <di:waypoint xsi:type="dc:Point" x="676" y="478" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="642" y="463" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_00jdkur_di" bpmnElement="StartEvent_1nbwxby">
+ <dc:Bounds x="210" y="460" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="228" y="501" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ohb1a_di" bpmnElement="SequenceFlow_19ohb1a">
+ <di:waypoint xsi:type="dc:Point" x="518" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="574" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="546" y="140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07u8e3l_di" bpmnElement="SequenceFlow_07u8e3l">
+ <di:waypoint xsi:type="dc:Point" x="674" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="742" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="708" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j52dxv_di" bpmnElement="SequenceFlow_0j52dxv">
+ <di:waypoint xsi:type="dc:Point" x="1651" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1543" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1542" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1597" y="286" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0srhar8_di" bpmnElement="PostProcessAddOnModule">
+ <dc:Bounds x="1651" y="262" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t407j7_di" bpmnElement="SequenceFlow_1t407j7">
+ <di:waypoint xsi:type="dc:Point" x="842" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="916" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0baw1tl_di" bpmnElement="SequenceFlow_0baw1tl">
+ <di:waypoint xsi:type="dc:Point" x="1016" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1091" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1054" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0i9vj5o_di" bpmnElement="Task_1mrb29r">
+ <dc:Bounds x="742" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0stghuy_di" bpmnElement="Task_0qrf3e8">
+ <dc:Bounds x="916" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn
new file mode 100644
index 0000000000..a900a4e241
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn
@@ -0,0 +1,541 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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="DoCreateVnfAndModulesRollback" name="DoCreateVnfAndModulesRollback" isExecutable="true">
+ <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true">
+ <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="SetFailedRollbackStatus" />
+ <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1wch84s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event')
+dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1wch84s" sourceRef="SetFailedRollbackStatus" targetRef="LogSaveWorkflowException" />
+ <bpmn2:scriptTask id="SetFailedRollbackStatus" name="Set Failed Rollback Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wch84s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr= new DoCreateVnfAndModulesRollback()
+dcvamr.setFailedRollbackStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:subProcess>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2" />
+ <bpmn2:startEvent id="StartEvent_1gai4qr">
+ <bpmn2:outgoing>SequenceFlow_1537b7m</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_12v8g91" name="Are there VF Modules to roll back?" default="SequenceFlow_1r6wyy6">
+ <bpmn2:incoming>SequenceFlow_1srw52v</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0zjzorm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_19xaddm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1r6wyy6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0v85t87</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09ajxqr" name="Delete VNF?" default="SequenceFlow_1yas9ol">
+ <bpmn2:incoming>SequenceFlow_1g6psjt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_152tazp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kr0r4a</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1yas9ol</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="EndEvent_1seag7u">
+ <bpmn2:incoming>SequenceFlow_0mk9lrj</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_03cc9y6</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1537b7m" sourceRef="StartEvent_1gai4qr" targetRef="PreProcessRequest" />
+ <bpmn2:scriptTask id="PreProcessRequest" name="PreProcess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1537b7m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bmsi5h</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr = new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bmsi5h" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_01o1lkn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ycq005" sourceRef="Task_1sbxjc8" targetRef="RollbackCreateVFModule" />
+ <bpmn2:scriptTask id="Task_1sbxjc8" name="Prepare Rollback Create VF Module Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0v85t87</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ycq005</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr = new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessCreateVfModuleRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="RollbackCreateVFModule" name="Rollback Create VF Module " calledElement="DoCreateVfModuleRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVAMR_RollbackData" target="rollbackData" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="&#34;true&#34;" target="isVidRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rolledBack" target="DCVM_rolledBack" />
+ <camunda:out source="rollbackError" target="rollbackError" />
+ <camunda:in source="DCVAMR_aLaCarte" target="aLaCarte" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1ycq005</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_181hb2a</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1r6wyy6" name="no" sourceRef="ExclusiveGateway_12v8g91" targetRef="ExclusiveGateway_07kr3gt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0v85t87" name="yes" sourceRef="ExclusiveGateway_12v8g91" targetRef="Task_1sbxjc8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_numOfModulesToDelete") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kr0r4a" name="yes" sourceRef="ExclusiveGateway_09ajxqr" targetRef="Task_0p8fmrm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_rollbackVnfCreate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_04yd2yr" sourceRef="Task_0p8fmrm" targetRef="SetSuccessfulRollbackStatus" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yas9ol" name="no" sourceRef="ExclusiveGateway_09ajxqr" targetRef="SetSuccessfulRollbackStatus" />
+ <bpmn2:callActivity id="Task_0p8fmrm" name="Delete VNF" calledElement="DoDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVAMR_vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1kr0r4a</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04yd2yr</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_181hb2a" sourceRef="RollbackCreateVFModule" targetRef="Task_0kf9oby" />
+ <bpmn2:scriptTask id="Task_0kf9oby" name="PostProcess Rollback Create VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_181hb2a</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1srw52v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr = new DoCreateVnfAndModulesRollback()
+dcvamr.postProcessCreateVfModuleRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1srw52v" sourceRef="Task_0kf9oby" targetRef="ExclusiveGateway_12v8g91" />
+ <bpmn2:scriptTask id="PreProcessSDNCDeactivateRequest" name="PreProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SDNCDeactivateYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0nysmc9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr= new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessSDNCDeactivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_1ug98j4" name="PostProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1hc04x2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19xaddm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr = new DoDeleteVnfAndModules()
+String response = execution.getVariable("DCVAMR_deactivateSDNCAdapterResponse")
+dcvamr.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCAdapterTopologyDeactivate" name="Call SDNC Adapter Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVAMR_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVAMR_deactivateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0nysmc9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1hc04x2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nysmc9" sourceRef="PreProcessSDNCDeactivateRequest" targetRef="SDNCAdapterTopologyDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1hc04x2" sourceRef="SDNCAdapterTopologyDeactivate" targetRef="ScriptTask_1ug98j4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1sr014x" name="Send SDNC Deactivate?" default="SequenceFlow_0zjzorm">
+ <bpmn2:incoming>SequenceFlow_1rezswi</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zjzorm</bpmn2:outgoing>
+ <bpmn2:outgoing>SDNCDeactivateYes</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zjzorm" name="no" sourceRef="ExclusiveGateway_1sr014x" targetRef="ExclusiveGateway_12v8g91" />
+ <bpmn2:sequenceFlow id="SDNCDeactivateYes" name="yes" sourceRef="ExclusiveGateway_1sr014x" targetRef="PreProcessSDNCDeactivateRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_rollbackSDNCActivate") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19xaddm" sourceRef="ScriptTask_1ug98j4" targetRef="ExclusiveGateway_12v8g91" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_07kr3gt" name="Send SDNC Unassign?" default="SequenceFlow_1g6psjt">
+ <bpmn2:incoming>SequenceFlow_1r6wyy6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1g6psjt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_01am36p</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1g6psjt" name="no" sourceRef="ExclusiveGateway_07kr3gt" targetRef="ExclusiveGateway_09ajxqr" />
+ <bpmn2:scriptTask id="ScriptTask_1ma7nvr" name="PreProcess SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_01am36p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a5ecvu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr= new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessSDNCUnassignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_018fqnd" name="Call SDNC Adapter Topology Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVAMR_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DCVAMR_unassignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0a5ecvu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ilok6u</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0b3jyb7" name="PostProcess SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ilok6u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_152tazp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr = new DoDeleteVnfAndModules()
+String response = execution.getVariable("DCVAMR_unassignSDNCAdapterResponse")
+dcvamr.validateSDNCResponse(execution, response, "unassign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0a5ecvu" sourceRef="ScriptTask_1ma7nvr" targetRef="CallActivity_018fqnd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ilok6u" sourceRef="CallActivity_018fqnd" targetRef="ScriptTask_0b3jyb7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_152tazp" sourceRef="ScriptTask_0b3jyb7" targetRef="ExclusiveGateway_09ajxqr" />
+ <bpmn2:sequenceFlow id="SequenceFlow_01am36p" name="yes" sourceRef="ExclusiveGateway_07kr3gt" targetRef="ScriptTask_1ma7nvr">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAMR_rollbackSDNCAssign") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_01o1lkn" name="Skip rollback?" default="SequenceFlow_1rezswi">
+ <bpmn2:incoming>SequenceFlow_0bmsi5h</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rezswi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0mk9lrj</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rezswi" name="no" sourceRef="ExclusiveGateway_01o1lkn" targetRef="ExclusiveGateway_1sr014x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0mk9lrj" name="yes" sourceRef="ExclusiveGateway_01o1lkn" targetRef="EndEvent_1seag7u">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_03cc9y6" sourceRef="SetSuccessfulRollbackStatus" targetRef="EndEvent_1seag7u" />
+ <bpmn2:scriptTask id="SetSuccessfulRollbackStatus" name="Set Successful Rollback Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yas9ol</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_04yd2yr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03cc9y6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcvamr= new DoCreateVnfAndModulesRollback()
+dcvamr.setSuccessfulRollbackStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModulesRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="16" y="1012" width="621" height="152" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">
+ <dc:Bounds x="36" y="1063" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="42" y="1108" width="85" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">
+ <dc:Bounds x="361" y="1041" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
+ <dc:Bounds x="537" y="1063" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="555" y="1099" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="619" y="1059" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="637" y="1095" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
+ <dc:Bounds x="710" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="728" y="1099" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="_BPMNShape_ScriptTask_281">
+ <di:waypoint xsi:type="dc:Point" x="72" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="161" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="117" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188">
+ <di:waypoint xsi:type="dc:Point" x="461" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="537" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189">
+ <di:waypoint xsi:type="dc:Point" x="655" y="1077" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="1076" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="683" y="1061.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_1gai4qr_di" bpmnElement="StartEvent_1gai4qr">
+ <dc:Bounds x="-91" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="691" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_12v8g91_di" bpmnElement="ExclusiveGateway_12v8g91" isMarkerVisible="true">
+ <dc:Bounds x="806" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="753" y="619" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09ajxqr_di" bpmnElement="ExclusiveGateway_09ajxqr" isMarkerVisible="true">
+ <dc:Bounds x="1291" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1241" y="786" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1seag7u_di" bpmnElement="EndEvent_1seag7u">
+ <dc:Bounds x="1678" y="806" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2135" y="827" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1537b7m_di" bpmnElement="SequenceFlow_1537b7m">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="-3" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-29" y="658" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0fckboe_di" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="-3" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bmsi5h_di" bpmnElement="SequenceFlow_0bmsi5h">
+ <di:waypoint xsi:type="dc:Point" x="97" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="124" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="124" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="150" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="139" y="673" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ycq005_di" bpmnElement="SequenceFlow_1ycq005">
+ <di:waypoint xsi:type="dc:Point" x="983" y="494" />
+ <di:waypoint xsi:type="dc:Point" x="1016" y="495" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1000" y="480" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1sc2oye_di" bpmnElement="Task_1sbxjc8">
+ <dc:Bounds x="883" y="455" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1lj1iud_di" bpmnElement="RollbackCreateVFModule">
+ <dc:Bounds x="1016" y="455" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r6wyy6_di" bpmnElement="SequenceFlow_1r6wyy6">
+ <di:waypoint xsi:type="dc:Point" x="831" y="698" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="838" y="759.6519350414114" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v85t87_di" bpmnElement="SequenceFlow_0v85t87">
+ <di:waypoint xsi:type="dc:Point" x="831" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="495" />
+ <di:waypoint xsi:type="dc:Point" x="883" y="495" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="837" y="572.1521739130435" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kr0r4a_di" bpmnElement="SequenceFlow_1kr0r4a">
+ <di:waypoint xsi:type="dc:Point" x="1316" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="1316" y="733" />
+ <di:waypoint xsi:type="dc:Point" x="1390" y="733" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1322" y="765.8928772635815" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04yd2yr_di" bpmnElement="SequenceFlow_04yd2yr">
+ <di:waypoint xsi:type="dc:Point" x="1490" y="733" />
+ <di:waypoint xsi:type="dc:Point" x="1592" y="733" />
+ <di:waypoint xsi:type="dc:Point" x="1592" y="784" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1541" y="718" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yas9ol_di" bpmnElement="SequenceFlow_1yas9ol">
+ <di:waypoint xsi:type="dc:Point" x="1341" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="1542" y="824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1503" y="807" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_01fs058_di" bpmnElement="Task_0p8fmrm">
+ <dc:Bounds x="1390" y="693" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_181hb2a_di" bpmnElement="SequenceFlow_181hb2a">
+ <di:waypoint xsi:type="dc:Point" x="1116" y="495" />
+ <di:waypoint xsi:type="dc:Point" x="1155" y="495" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1136" y="480" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_196e1px_di" bpmnElement="Task_0kf9oby">
+ <dc:Bounds x="1155" y="455" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1srw52v_di" bpmnElement="SequenceFlow_1srw52v">
+ <di:waypoint xsi:type="dc:Point" x="1205" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="1205" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="856" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1220" y="604" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_12w53bf_di" bpmnElement="PreProcessSDNCDeactivateRequest">
+ <dc:Bounds x="323" y="795" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ug98j4_di" bpmnElement="ScriptTask_1ug98j4">
+ <dc:Bounds x="617" y="795" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1gvc90m_di" bpmnElement="SDNCAdapterTopologyDeactivate">
+ <dc:Bounds x="473" y="795" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nysmc9_di" bpmnElement="SequenceFlow_0nysmc9">
+ <di:waypoint xsi:type="dc:Point" x="423" y="835" />
+ <di:waypoint xsi:type="dc:Point" x="473" y="835" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="449" y="820" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hc04x2_di" bpmnElement="SequenceFlow_1hc04x2">
+ <di:waypoint xsi:type="dc:Point" x="573" y="835" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="835" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="595" y="820" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1sr014x_di" bpmnElement="ExclusiveGateway_1sr014x" isMarkerVisible="true">
+ <dc:Bounds x="277" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="608" width="62" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zjzorm_di" bpmnElement="SequenceFlow_0zjzorm">
+ <di:waypoint xsi:type="dc:Point" x="327" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="806" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="561" y="658" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tgi77m_di" bpmnElement="SDNCDeactivateYes">
+ <di:waypoint xsi:type="dc:Point" x="302" y="698" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="835" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="835" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="308" y="756.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19xaddm_di" bpmnElement="SequenceFlow_19xaddm">
+ <di:waypoint xsi:type="dc:Point" x="717" y="835" />
+ <di:waypoint xsi:type="dc:Point" x="781" y="835" />
+ <di:waypoint xsi:type="dc:Point" x="781" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="806" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="754" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07kr3gt_di" bpmnElement="ExclusiveGateway_07kr3gt" isMarkerVisible="true">
+ <dc:Bounds x="806" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="858" width="62" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1g6psjt_di" bpmnElement="SequenceFlow_1g6psjt">
+ <di:waypoint xsi:type="dc:Point" x="856" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="1074" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="1074" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="1291" y="824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1083" y="824" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ma7nvr_di" bpmnElement="ScriptTask_1ma7nvr">
+ <dc:Bounds x="873" y="905" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_018fqnd_di" bpmnElement="CallActivity_018fqnd">
+ <dc:Bounds x="1034" y="905" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0b3jyb7_di" bpmnElement="ScriptTask_0b3jyb7">
+ <dc:Bounds x="1195" y="905" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a5ecvu_di" bpmnElement="SequenceFlow_0a5ecvu">
+ <di:waypoint xsi:type="dc:Point" x="973" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1034" y="945" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1004" y="930" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ilok6u_di" bpmnElement="SequenceFlow_1ilok6u">
+ <di:waypoint xsi:type="dc:Point" x="1134" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1195" y="945" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1165" y="930" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_152tazp_di" bpmnElement="SequenceFlow_152tazp">
+ <di:waypoint xsi:type="dc:Point" x="1295" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1316" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1316" y="849" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1306" y="920" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01am36p_di" bpmnElement="SequenceFlow_01am36p">
+ <di:waypoint xsi:type="dc:Point" x="831" y="849" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="873" y="945" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="838" y="897" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_01o1lkn_di" bpmnElement="ExclusiveGateway_01o1lkn" isMarkerVisible="true">
+ <dc:Bounds x="150" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="136" y="614" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rezswi_di" bpmnElement="SequenceFlow_1rezswi">
+ <di:waypoint xsi:type="dc:Point" x="200" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="239" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="239" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="277" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="214" y="648" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mk9lrj_di" bpmnElement="SequenceFlow_0mk9lrj">
+ <di:waypoint xsi:type="dc:Point" x="175" y="698" />
+ <di:waypoint xsi:type="dc:Point" x="175" y="991" />
+ <di:waypoint xsi:type="dc:Point" x="1696" y="1002" />
+ <di:waypoint xsi:type="dc:Point" x="1696" y="842" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="147" y="775" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03cc9y6_di" bpmnElement="SequenceFlow_03cc9y6">
+ <di:waypoint xsi:type="dc:Point" x="1642" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="1678" y="824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1660" y="809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1a3lghn_di" bpmnElement="SetSuccessfulRollbackStatus">
+ <dc:Bounds x="1542" y="784" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wch84s_di" bpmnElement="SequenceFlow_1wch84s">
+ <di:waypoint xsi:type="dc:Point" x="261" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="311" y="1066" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1od8f5n_di" bpmnElement="SetFailedRollbackStatus">
+ <dc:Bounds x="161" y="1041" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </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
new file mode 100644
index 0000000000..73c21090ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -0,0 +1,470 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoCustomDeleteE2EServiceInstanceV3" name="All Resources Deleted" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_06phzgv" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11e6bfy</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <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>
+ <bpmn:outgoing>SequenceFlow_0e7inkl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.deleteServiceInstance(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_1u8zt9i" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0sf5lpt">
+ <bpmn:outgoing>SequenceFlow_1921mo3</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_06utmg4">
+ <bpmn:incoming>SequenceFlow_18vlzfo</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0nha3pr" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1921mo3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18vlzfo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1921mo3" name="" sourceRef="StartEvent_0sf5lpt" targetRef="ScriptTask_0nha3pr" />
+ <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_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>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = execution.getVariable("resourceType")
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1dza4q4" sourceRef="ScriptTask_0z30dax" targetRef="CallActivity_Del_SDNC_cust" />
+ <bpmn:sequenceFlow id="SequenceFlow_1wnkgpx" sourceRef="Task_0z1x3sg" targetRef="Task_0963dho" />
+ <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For NS" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1x3lehs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wnkgpx</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = execution.getVariable("resourceType")
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for NS" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1wnkgpx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0phwem2</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:serviceTask id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC Overlay" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1dza4q4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lxqjmp</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0edkv0m" name="Call Delete SDNC Service Topology" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1icwpye</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ev7z6q</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="ScriptTask_146jt8v" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ym9otf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_00tg69u" name="Init Resource Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_openecomp_db_endpoint}</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_initResOperStatusRequest}</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_1ym9otf</bpmn:incoming>
+ <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>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.sequenceResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1j08ko3" sourceRef="ServiceTask_00tg69u" targetRef="ScriptTask_0o5bglz" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource">
+ <bpmn:incoming>SequenceFlow_1htjmkv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ubor5z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1x3lehs</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_12q6a51" name="Get Current Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_03c0zlq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0s1lswk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1htjmkv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.getCurrentResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_03c0zlq" sourceRef="ScriptTask_0o5bglz" targetRef="ScriptTask_12q6a51" />
+ <bpmn:sequenceFlow id="SequenceFlow_1htjmkv" sourceRef="ScriptTask_12q6a51" targetRef="ExclusiveGateway_07toixi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ubor5z" name="SDN-C" sourceRef="ExclusiveGateway_07toixi" targetRef="ScriptTask_0z30dax">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "SDN-C" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "VF-C" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="ScriptTask_0w46sge" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1lxqjmp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0phwem2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0l5r96s</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.parseNextResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1lxqjmp" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_0w46sge" />
+ <bpmn:sequenceFlow id="SequenceFlow_0phwem2" sourceRef="Task_0963dho" targetRef="ScriptTask_0w46sge" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted">
+ <bpmn:incoming>SequenceFlow_0l5r96s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0talboa</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0s1lswk</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0l5r96s" sourceRef="ScriptTask_0w46sge" targetRef="ExclusiveGateway_1hgjg3u" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained">
+ <bpmn:incoming>SequenceFlow_0talboa</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1icwpye</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0oj2anh</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1icwpye" name="yes" sourceRef="ExclusiveGateway_16046vb" targetRef="Task_0edkv0m">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1ev7z6q" sourceRef="Task_0edkv0m" targetRef="ScriptTask_01erufg" />
+ <bpmn:sequenceFlow id="SequenceFlow_0oj2anh" name="no" sourceRef="ExclusiveGateway_16046vb" targetRef="ScriptTask_01erufg">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0talboa" name="yes" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ExclusiveGateway_16046vb">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstanceV3">
+ <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r">
+ <dc:Bounds x="-612" y="-35" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-618" y="6" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_06phzgv_di" bpmnElement="ScriptTask_06phzgv">
+ <dc:Bounds x="-519" y="-57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26">
+ <dc:Bounds x="1388" y="790" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true">
+ <dc:Bounds x="292" y="675" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9">
+ <di:waypoint xsi:type="dc:Point" x="-576" y="-17" />
+ <di:waypoint xsi:type="dc:Point" x="-519" y="-17" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-592.5" y="-38" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-433" y="-38" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
+ <di:waypoint xsi:type="dc:Point" x="1406" y="593" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="790" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <dc:Bounds x="288" y="783" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4">
+ <dc:Bounds x="653" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="783" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr">
+ <dc:Bounds x="464" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3">
+ <di:waypoint xsi:type="dc:Point" x="396" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="340" y="745" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo">
+ <di:waypoint xsi:type="dc:Point" x="564" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="653" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="520" y="745" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax">
+ <dc:Bounds x="470" y="111" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4">
+ <di:waypoint xsi:type="dc:Point" x="570" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="152" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="130.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx">
+ <di:waypoint xsi:type="dc:Point" x="576" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="378" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="587" y="357" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg">
+ <dc:Bounds x="476" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho">
+ <dc:Bounds x="688" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust">
+ <dc:Bounds x="688" y="112" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
+ <dc:Bounds x="1356" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v">
+ <dc:Bounds x="-26" y="-57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u">
+ <dc:Bounds x="-26" y="67" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf">
+ <di:waypoint xsi:type="dc:Point" x="24" y="23" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="67" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-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>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j08ko3_di" bpmnElement="SequenceFlow_1j08ko3">
+ <di:waypoint xsi:type="dc:Point" x="24" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="184" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07toixi_di" bpmnElement="ExclusiveGateway_07toixi" isMarkerVisible="true">
+ <dc:Bounds x="342.56962025316454" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="332" y="302" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_12q6a51_di" bpmnElement="ScriptTask_12q6a51">
+ <dc:Bounds x="159" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_03c0zlq_di" bpmnElement="SequenceFlow_03c0zlq">
+ <di:waypoint xsi:type="dc:Point" x="24" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="494" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="397.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1htjmkv_di" bpmnElement="SequenceFlow_1htjmkv">
+ <di:waypoint xsi:type="dc:Point" x="209" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="343" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="355.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ubor5z_di" bpmnElement="SequenceFlow_1ubor5z">
+ <di:waypoint xsi:type="dc:Point" x="368" y="248" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="151" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="193.5" width="35" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x3lehs_di" bpmnElement="SequenceFlow_1x3lehs">
+ <di:waypoint xsi:type="dc:Point" x="368" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="378" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="353" width="27" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w46sge_di" bpmnElement="ScriptTask_0w46sge">
+ <dc:Bounds x="865" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lxqjmp_di" bpmnElement="SequenceFlow_1lxqjmp">
+ <di:waypoint xsi:type="dc:Point" x="788" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="206.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0phwem2_di" bpmnElement="SequenceFlow_0phwem2">
+ <di:waypoint xsi:type="dc:Point" x="788" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="319.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hgjg3u_di" bpmnElement="ExclusiveGateway_1hgjg3u" isMarkerVisible="true">
+ <dc:Bounds x="1040.9252217997464" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="302" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0l5r96s_di" bpmnElement="SequenceFlow_0l5r96s">
+ <di:waypoint xsi:type="dc:Point" x="965" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1041" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1003" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_16046vb_di" bpmnElement="ExclusiveGateway_16046vb" isMarkerVisible="true">
+ <dc:Bounds x="1203.8174904942966" y="248.28010139416983" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="302" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1icwpye_di" bpmnElement="SequenceFlow_1icwpye">
+ <di:waypoint xsi:type="dc:Point" x="1254" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1297" y="252" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ev7z6q_di" bpmnElement="SequenceFlow_1ev7z6q">
+ <di:waypoint xsi:type="dc:Point" x="1406" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="513" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1376" y="407" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oj2anh_di" bpmnElement="SequenceFlow_0oj2anh">
+ <di:waypoint xsi:type="dc:Point" x="1229" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="553" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="553" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1238" y="419.5" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0talboa_di" bpmnElement="SequenceFlow_0talboa">
+ <di:waypoint xsi:type="dc:Point" x="1091" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1204" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1138" y="252" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s1lswk_di" bpmnElement="SequenceFlow_0s1lswk">
+ <di:waypoint xsi:type="dc:Point" x="1066" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1066" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="259" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1075" y="388" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
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
new file mode 100644
index 0000000000..3e76f61224
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
@@ -0,0 +1,928 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoCustomDeleteE2EServiceInstanceV2" name="DoCustomDeleteE2EServiceInstanceV2" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_06phzgv" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11e6bfy</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <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:outgoing>SequenceFlow_00a3ijv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+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_0t5f2dt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0e7inkl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.deleteServiceInstance(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_1u8zt9i" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0sf5lpt">
+ <bpmn:outgoing>SequenceFlow_1921mo3</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_06utmg4">
+ <bpmn:incoming>SequenceFlow_18vlzfo</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0nha3pr" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1921mo3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18vlzfo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1921mo3" name="" sourceRef="StartEvent_0sf5lpt" targetRef="ScriptTask_0nha3pr" />
+ <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_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>
+ <bpmn:outgoing>SequenceFlow_17b01zs</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("vfcDeleteResponse")
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.postProcessVFCDelete(execution, response, "delete")]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1g0tsto" name="Post Process SDNC Delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1w2n8dn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_09z6zl7</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For Overlay" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1jfyo1x</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1t1mg6y</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = "underlay"
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preSDNCResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0rpu756" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ExclusiveGateway_0plkf6p" />
+ <bpmn:sequenceFlow id="SequenceFlow_1wnkgpx" sourceRef="Task_preProcessVFCResourceDelete" targetRef="Task_CallNetworkServiceDeleteforVFC" />
+ <bpmn:sequenceFlow id="SequenceFlow_1931m8u" sourceRef="Task_CallNetworkServiceDeleteforVFC" targetRef="ScriptTask_postProcessVFCDelete" />
+ <bpmn:scriptTask id="Task_preProcessVFCResourceDelete" name="Prepare Resource Delele For VFC" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1bx4es4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wnkgpx</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preProcessVFCResourceDelete(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_CallNetworkServiceDeleteforVFC" name="Call Network Service Delete for VFC" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1wnkgpx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1931m8u</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:serviceTask id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC Overlay" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_0a1q5fw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0rpu756</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1g4djgh" sourceRef="Task_1j1u666" targetRef="ExclusiveGateway_125wehq" />
+ <bpmn:sequenceFlow id="SequenceFlow_0uc2beq" sourceRef="Task_0edkv0m" targetRef="ExclusiveGateway_1kavnc9" />
+ <bpmn:scriptTask id="Task_14erap6" name="Prepare Resource Delele For Underlay" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1lv9vmb</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_16r9z75</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = "underlay"
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preSDNCResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_1j1u666" name="Call Custom Delete SDNC Underlay" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_0m7ks9t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1g4djgh</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0edkv0m" name="Call Delete SDNC Service Topology" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <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" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_1h6kkwi" name="Start Delete SDNC Resource">
+ <bpmn:outgoing>SequenceFlow_1jfyo1x</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="DeleteSDNCResource" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1jfyo1x" sourceRef="IntermediateThrowEvent_1h6kkwi" targetRef="ScriptTask_0z30dax" />
+ <bpmn:sequenceFlow id="SequenceFlow_09z6zl7" sourceRef="ScriptTask_1g0tsto" targetRef="IntermediateThrowEvent_01vy71e" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_01vy71e" name="GoTo Delete VFC Resource">
+ <bpmn:incoming>SequenceFlow_09z6zl7</bpmn:incoming>
+ <bpmn:linkEventDefinition name="DeleteVFCResource" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_17b01zs" sourceRef="ScriptTask_postProcessVFCDelete" targetRef="ScriptTask_postProcessDecomposeNextResource" />
+ <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_0ow0ck5" name="Start Delete VFC Resource">
+ <bpmn:outgoing>SequenceFlow_0homduu</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="DeleteVFCResource" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0homduu" sourceRef="IntermediateThrowEvent_0ow0ck5" targetRef="ExclusiveGateway_ServiceResourceIsFinish" />
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_03gc5du" name="Start Delete Service Instance">
+ <bpmn:outgoing>SequenceFlow_0t5f2dt</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="DeleteServiceInstance" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0t5f2dt" sourceRef="IntermediateCatchEvent_03gc5du" targetRef="ScriptTask_01erufg" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_ServiceResourceIsFinish" name="Service Resource Finish?" default="SequenceFlow_0n7qeqt">
+ <bpmn:incoming>SequenceFlow_0homduu</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0eoibq3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0n7qeqt</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_13c2v9z</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0n7qeqt" name="No" sourceRef="ExclusiveGateway_ServiceResourceIsFinish" targetRef="ScriptTask_preProcessDecomposeNextResource" />
+ <bpmn:scriptTask id="ScriptTask_preProcessDecomposeNextResource" name="PreProcess Decompose Next Resouce" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0n7qeqt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1a5ki3p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preProcessDecomposeNextResource(execution )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1a5ki3p" sourceRef="ScriptTask_preProcessDecomposeNextResource" targetRef="ScriptTask_0mjvi2p" />
+ <bpmn:scriptTask id="ScriptTask_postProcessDecomposeNextResource" name="PostProcess Decompose Next Resouce" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_17b01zs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0gxv0wp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.postProcessDecomposeNextResource(execution )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0gxv0wp" sourceRef="ScriptTask_postProcessDecomposeNextResource" targetRef="ScriptTask_06sbvjm" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_01fw8bb" name="GoTo Delete Servcie Instance">
+ <bpmn:incoming>SequenceFlow_13c2v9z</bpmn:incoming>
+ <bpmn:linkEventDefinition name="DeleteServiceInstance" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_13c2v9z" name="Yes" sourceRef="ExclusiveGateway_ServiceResourceIsFinish" targetRef="IntermediateThrowEvent_01fw8bb">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{ execution.getVariable("DDELSI_resourceFinish") != null && execution.getVariable("DDELSI_resourceFinish") == true }]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_052agzc" name="Found Resource?" default="SequenceFlow_1fac57w">
+ <bpmn:incoming>SequenceFlow_1t1mg6y</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0a1q5fw</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1fac57w</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1t1mg6y" sourceRef="ScriptTask_0z30dax" targetRef="ExclusiveGateway_052agzc" />
+ <bpmn:sequenceFlow id="SequenceFlow_0a1q5fw" name="Yes" sourceRef="ExclusiveGateway_052agzc" targetRef="CallActivity_Del_SDNC_cust">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{ execution.getVariable("foundResource") != null && execution.getVariable("foundResource") == true }]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0plkf6p">
+ <bpmn:incoming>SequenceFlow_0rpu756</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1fac57w</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lv9vmb</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1lv9vmb" sourceRef="ExclusiveGateway_0plkf6p" targetRef="Task_14erap6" />
+ <bpmn:sequenceFlow id="SequenceFlow_1fac57w" name="No" sourceRef="ExclusiveGateway_052agzc" targetRef="ExclusiveGateway_0plkf6p" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0u98ylh" name="Found Resource?" default="SequenceFlow_00knko8">
+ <bpmn:incoming>SequenceFlow_16r9z75</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0m7ks9t</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_00knko8</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_16r9z75" sourceRef="Task_14erap6" targetRef="ExclusiveGateway_0u98ylh" />
+ <bpmn:sequenceFlow id="SequenceFlow_0m7ks9t" name="Yes" sourceRef="ExclusiveGateway_0u98ylh" targetRef="Task_1j1u666">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{ execution.getVariable("foundResource") != null && execution.getVariable("foundResource") == true }]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_125wehq" default="SequenceFlow_15pzf5n">
+ <bpmn:incoming>SequenceFlow_1g4djgh</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_00knko8</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0akcnw7</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_15pzf5n</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0akcnw7" name="yes" sourceRef="ExclusiveGateway_125wehq" targetRef="Task_0edkv0m">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{ execution.getVariable("foundResource") != null && execution.getVariable("foundResource") == true }]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_00knko8" name="No" sourceRef="ExclusiveGateway_0u98ylh" targetRef="ExclusiveGateway_125wehq" />
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_1t1fier" name="Start UpateOperStatus">
+ <bpmn:outgoing>SequenceFlow_033eqeg</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="UpateOperStatus" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_033eqeg" sourceRef="IntermediateCatchEvent_1t1fier" targetRef="ScriptTask_1ut5zs5" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1q64g27" name="GoTo UpateOperStatus">
+ <bpmn:incoming>SequenceFlow_00a3ijv</bpmn:incoming>
+ <bpmn:linkEventDefinition name="UpateOperStatus" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_00a3ijv" sourceRef="ScriptTask_1rtnsh8" targetRef="IntermediateThrowEvent_1q64g27" />
+ <bpmn:scriptTask id="ScriptTask_PrepareServiceResources" name="Prepare Service Resources" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_18wibmi</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11405m9</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.prepareServiceDeleteResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_11405m9" sourceRef="ScriptTask_PrepareServiceResources" targetRef="ScriptTask_0w4scer" />
+ <bpmn:scriptTask id="ScriptTask_1ut5zs5" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_033eqeg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sm5x5e</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_0kl5qtj" name="Update Service Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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_1sm5x5e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18wibmi</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1sm5x5e" sourceRef="ScriptTask_1ut5zs5" targetRef="ServiceTask_0kl5qtj" />
+ <bpmn:sequenceFlow id="SequenceFlow_18wibmi" sourceRef="ServiceTask_0kl5qtj" targetRef="ScriptTask_PrepareServiceResources" />
+ <bpmn:scriptTask id="ScriptTask_1vlvb1r" name="Prepare Update Service Oper Status(100%)" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0e7inkl</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0l4qcge</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "100")
+execution.setVariable("operationStatus", "End")
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_0lint2e" name="Update Service Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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_0l4qcge</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_06tonva</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0l4qcge" sourceRef="ScriptTask_1vlvb1r" targetRef="ServiceTask_0lint2e" />
+ <bpmn:sequenceFlow id="SequenceFlow_06tonva" sourceRef="ServiceTask_0lint2e" targetRef="EndEvent_1uqzt26" />
+ <bpmn:scriptTask id="ScriptTask_06sbvjm" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0gxv0wp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1i96ytk</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1i96ytk" sourceRef="ScriptTask_06sbvjm" targetRef="ServiceTask_0bia9bb" />
+ <bpmn:serviceTask id="ServiceTask_0bia9bb" name="Update Service Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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_1i96ytk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0eoibq3</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0eoibq3" sourceRef="ServiceTask_0bia9bb" targetRef="ExclusiveGateway_ServiceResourceIsFinish" />
+ <bpmn:scriptTask id="ScriptTask_0mjvi2p" name="Prepare Update Service Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1a5ki3p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oo4g4h</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1oo4g4h" sourceRef="ScriptTask_0mjvi2p" targetRef="ServiceTask_0vk2b9b" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1kavnc9">
+ <bpmn:incoming>SequenceFlow_0uc2beq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_15pzf5n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1w2n8dn</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1w2n8dn" sourceRef="ExclusiveGateway_1kavnc9" targetRef="ScriptTask_1g0tsto" />
+ <bpmn:sequenceFlow id="SequenceFlow_15pzf5n" sourceRef="ExclusiveGateway_125wehq" targetRef="ExclusiveGateway_1kavnc9" />
+ <bpmn:serviceTask id="ServiceTask_0vk2b9b" name="Update Service Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_updateServiceOperStatusRequest}</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_1oo4g4h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bx4es4</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1bx4es4" sourceRef="ServiceTask_0vk2b9b" targetRef="Task_preProcessVFCResourceDelete" />
+ <bpmn:scriptTask id="ScriptTask_0w4scer" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_11405m9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15d5odq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_15d5odq" sourceRef="ScriptTask_0w4scer" targetRef="ServiceTask_1mg7vnx" />
+ <bpmn:serviceTask id="ServiceTask_1mg7vnx" name="Init Resource Oper Status">
+ <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_initResOperStatusRequest}</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_15d5odq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1qzxy2i</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1qzxy2i" sourceRef="ServiceTask_1mg7vnx" targetRef="IntermediateThrowEvent_1d5z35x" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstanceV2">
+ <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r">
+ <dc:Bounds x="75" y="110" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="69" y="151" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_06phzgv_di" bpmnElement="ScriptTask_06phzgv">
+ <dc:Bounds x="311" y="88" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26">
+ <dc:Bounds x="1127" y="1238" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1055" y="1279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
+ <dc:Bounds x="1055" 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" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true">
+ <dc:Bounds x="192" y="1439" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9">
+ <di:waypoint xsi:type="dc:Point" x="111" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="166" y="107" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="391" y="107" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
+ <di:waypoint xsi:type="dc:Point" x="386" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="533" y="1256" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="414.5" y="1235" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt">
+ <dc:Bounds x="260" y="1506" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="188" y="1547" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4">
+ <dc:Bounds x="553" y="1506" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="481" y="1547" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr">
+ <dc:Bounds x="364" y="1484" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3">
+ <di:waypoint xsi:type="dc:Point" x="296" y="1524" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="1524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="240" y="1509" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo">
+ <di:waypoint xsi:type="dc:Point" x="464" y="1524" />
+ <di:waypoint xsi:type="dc:Point" x="553" y="1524" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420" y="1509" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0mdub03_di" bpmnElement="ScriptTask_postProcessVFCDelete">
+ <dc:Bounds x="1046" y="1107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1g0tsto_di" bpmnElement="ScriptTask_1g0tsto">
+ <dc:Bounds x="1045" y="775" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax">
+ <dc:Bounds x="311" y="577" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rpu756_di" bpmnElement="SequenceFlow_0rpu756">
+ <di:waypoint xsi:type="dc:Point" x="411" y="823" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="823" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="743" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="802" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx">
+ <di:waypoint xsi:type="dc:Point" x="931" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="943.5" y="959" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1931m8u_di" bpmnElement="SequenceFlow_1931m8u">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="1020" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="1107" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="1058" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_preProcessVFCResourceDelete">
+ <dc:Bounds x="831" y="940" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_CallNetworkServiceDeleteforVFC">
+ <dc:Bounds x="1046" y="940" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust">
+ <dc:Bounds x="311" y="784" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1g4djgh_di" bpmnElement="SequenceFlow_1g4djgh">
+ <di:waypoint xsi:type="dc:Point" x="757" y="815" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="815" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="743" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="790" y="794" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uc2beq_di" bpmnElement="SequenceFlow_0uc2beq">
+ <di:waypoint xsi:type="dc:Point" x="1095" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1050.5" y="654" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1e5z0wu_di" bpmnElement="Task_14erap6">
+ <dc:Bounds x="657" y="577" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0f0965f_di" bpmnElement="Task_1j1u666">
+ <dc:Bounds x="657" y="775" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <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>
+ <dc:Bounds x="1275" y="416" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0a6c9bw_di" bpmnElement="IntermediateThrowEvent_1h6kkwi">
+ <dc:Bounds x="71" y="599" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="52" y="639" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jfyo1x_di" bpmnElement="SequenceFlow_1jfyo1x">
+ <di:waypoint xsi:type="dc:Point" x="107" y="617" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="617" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="617" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="617" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="179" y="611" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_09z6zl7_di" bpmnElement="SequenceFlow_09z6zl7">
+ <di:waypoint xsi:type="dc:Point" x="1145" y="815" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="815" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1175" y="794" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_01qtcpf_di" bpmnElement="IntermediateThrowEvent_01vy71e">
+ <dc:Bounds x="1294" y="797" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="837" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17b01zs_di" bpmnElement="SequenceFlow_17b01zs">
+ <di:waypoint xsi:type="dc:Point" x="1046" y="1147" />
+ <di:waypoint xsi:type="dc:Point" x="895" y="1147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="925.5" y="1126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_197wgz2_di" bpmnElement="IntermediateThrowEvent_0ow0ck5">
+ <dc:Bounds x="71" y="905" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="49" y="945" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0homduu_di" bpmnElement="SequenceFlow_0homduu">
+ <di:waypoint xsi:type="dc:Point" x="107" y="923" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="923" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="955" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="111" y="902" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_03gc5du_di" bpmnElement="IntermediateCatchEvent_03gc5du">
+ <dc:Bounds x="57" y="1238" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="36" y="1278" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t5f2dt_di" bpmnElement="SequenceFlow_0t5f2dt">
+ <di:waypoint xsi:type="dc:Point" x="93" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="286" y="1256" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="144.5" y="1235" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_18ardb3_di" bpmnElement="ExclusiveGateway_ServiceResourceIsFinish" isMarkerVisible="true">
+ <dc:Bounds x="179" y="955" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="196" y="911" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n7qeqt_di" bpmnElement="SequenceFlow_0n7qeqt">
+ <di:waypoint xsi:type="dc:Point" x="229" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="263" y="959" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01wud4g_di" bpmnElement="ScriptTask_preProcessDecomposeNextResource">
+ <dc:Bounds x="311" y="940" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a5ki3p_di" bpmnElement="SequenceFlow_1a5ki3p">
+ <di:waypoint xsi:type="dc:Point" x="411" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="395.5" y="959" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_06p63xt_di" bpmnElement="ScriptTask_postProcessDecomposeNextResource">
+ <dc:Bounds x="795" y="1107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gxv0wp_di" bpmnElement="SequenceFlow_0gxv0wp">
+ <di:waypoint xsi:type="dc:Point" x="795" y="1147" />
+ <di:waypoint xsi:type="dc:Point" x="612" y="1147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="658.5" y="1126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_01fw8bb_di" bpmnElement="IntermediateThrowEvent_01fw8bb">
+ <dc:Bounds x="186" y="1061" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="166" y="1101" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13c2v9z_di" bpmnElement="SequenceFlow_13c2v9z">
+ <di:waypoint xsi:type="dc:Point" x="204" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="1061" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="219" y="1014" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_052agzc_di" bpmnElement="ExclusiveGateway_052agzc" isMarkerVisible="true">
+ <dc:Bounds x="336" y="693" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="253" y="691" width="88" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t1mg6y_di" bpmnElement="SequenceFlow_1t1mg6y">
+ <di:waypoint xsi:type="dc:Point" x="361" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="669" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a1q5fw_di" bpmnElement="SequenceFlow_0a1q5fw">
+ <di:waypoint xsi:type="dc:Point" x="361" y="743" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="784" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="758" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0plkf6p_di" bpmnElement="ExclusiveGateway_0plkf6p" isMarkerVisible="true">
+ <dc:Bounds x="505" y="693" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="747" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lv9vmb_di" bpmnElement="SequenceFlow_1lv9vmb">
+ <di:waypoint xsi:type="dc:Point" x="530" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="618" />
+ <di:waypoint xsi:type="dc:Point" x="657" y="618" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="500" y="650" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fac57w_di" bpmnElement="SequenceFlow_1fac57w">
+ <di:waypoint xsi:type="dc:Point" x="386" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="505" y="718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="697" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0u98ylh_di" bpmnElement="ExclusiveGateway_0u98ylh" isMarkerVisible="true">
+ <dc:Bounds x="682" y="693" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="612" y="687" width="88" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16r9z75_di" bpmnElement="SequenceFlow_16r9z75">
+ <di:waypoint xsi:type="dc:Point" x="707" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="669" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m7ks9t_di" bpmnElement="SequenceFlow_0m7ks9t">
+ <di:waypoint xsi:type="dc:Point" x="707" y="743" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="713" y="753" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_125wehq_di" bpmnElement="ExclusiveGateway_125wehq" isMarkerVisible="true">
+ <dc:Bounds x="888" y="693" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="868" y="747" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0akcnw7_di" bpmnElement="SequenceFlow_0akcnw7">
+ <di:waypoint xsi:type="dc:Point" x="913" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="913" y="617" />
+ <di:waypoint xsi:type="dc:Point" x="1055" y="617" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="919" y="649" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00knko8_di" bpmnElement="SequenceFlow_00knko8">
+ <di:waypoint xsi:type="dc:Point" x="732" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="888" y="718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="803" y="697" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1t1fier_di" bpmnElement="IntermediateCatchEvent_1t1fier">
+ <dc:Bounds x="71" y="376" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="56" y="416" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_033eqeg_di" bpmnElement="SequenceFlow_033eqeg">
+ <di:waypoint xsi:type="dc:Point" x="107" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="179" y="388" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1q64g27_di" bpmnElement="IntermediateThrowEvent_1q64g27">
+ <dc:Bounds x="1294" y="110" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1274" y="150" width="85" height="24" />
+ </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="1294" y="128" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1179.5" y="107" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1fqk4c6_di" bpmnElement="ScriptTask_PrepareServiceResources">
+ <dc:Bounds x="657" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11405m9_di" bpmnElement="SequenceFlow_11405m9">
+ <di:waypoint xsi:type="dc:Point" x="757" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="810" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="810" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="863" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="780" y="388" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ut5zs5_di" bpmnElement="ScriptTask_1ut5zs5">
+ <dc:Bounds x="311" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0kl5qtj_di" bpmnElement="ServiceTask_0kl5qtj">
+ <dc:Bounds x="470" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sm5x5e_di" bpmnElement="SequenceFlow_1sm5x5e">
+ <di:waypoint xsi:type="dc:Point" x="411" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="395.5" y="373" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18wibmi_di" bpmnElement="SequenceFlow_18wibmi">
+ <di:waypoint xsi:type="dc:Point" x="570" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="657" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="568.5" y="373" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1vlvb1r_di" bpmnElement="ScriptTask_1vlvb1r">
+ <dc:Bounds x="533" y="1216" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0lint2e_di" bpmnElement="ServiceTask_0lint2e">
+ <dc:Bounds x="795" y="1216" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0l4qcge_di" bpmnElement="SequenceFlow_0l4qcge">
+ <di:waypoint xsi:type="dc:Point" x="633" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="795" y="1256" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="669" y="1235" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06tonva_di" bpmnElement="SequenceFlow_06tonva">
+ <di:waypoint xsi:type="dc:Point" x="895" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="1256" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="966" y="1235" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_06sbvjm_di" bpmnElement="ScriptTask_06sbvjm">
+ <dc:Bounds x="512" y="1107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i96ytk_di" bpmnElement="SequenceFlow_1i96ytk">
+ <di:waypoint xsi:type="dc:Point" x="512" y="1147" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="1147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="461.5" y="1126" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0bia9bb_di" bpmnElement="ServiceTask_0bia9bb">
+ <dc:Bounds x="311" y="1107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eoibq3_di" bpmnElement="SequenceFlow_0eoibq3">
+ <di:waypoint xsi:type="dc:Point" x="311" y="1147" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="1147" />
+ <di:waypoint xsi:type="dc:Point" x="106" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="179" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="121" y="1057.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0mjvi2p_di" bpmnElement="ScriptTask_0mjvi2p">
+ <dc:Bounds x="470" y="940" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oo4g4h_di" bpmnElement="SequenceFlow_1oo4g4h">
+ <di:waypoint xsi:type="dc:Point" x="570" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="638" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="604" y="959" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kavnc9_di" bpmnElement="ExclusiveGateway_1kavnc9" isMarkerVisible="true">
+ <dc:Bounds x="1071" y="693" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1051" y="747" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w2n8dn_di" bpmnElement="SequenceFlow_1w2n8dn">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="743" />
+ <di:waypoint xsi:type="dc:Point" x="1095" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1095.5" y="738" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15pzf5n_di" bpmnElement="SequenceFlow_15pzf5n">
+ <di:waypoint xsi:type="dc:Point" x="938" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="1005" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="1005" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1020" y="712" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0vk2b9b_di" bpmnElement="ServiceTask_0vk2b9b">
+ <dc:Bounds x="638" y="940" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bx4es4_di" bpmnElement="SequenceFlow_1bx4es4">
+ <di:waypoint xsi:type="dc:Point" x="738" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784.5" y="959" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w4scer_di" bpmnElement="ScriptTask_0w4scer">
+ <dc:Bounds x="863" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15d5odq_di" bpmnElement="SequenceFlow_15d5odq">
+ <di:waypoint xsi:type="dc:Point" x="963" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1055" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="964" y="373" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1mg7vnx_di" bpmnElement="ServiceTask_1mg7vnx">
+ <dc:Bounds x="1055" y="354" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qzxy2i_di" bpmnElement="SequenceFlow_1qzxy2i">
+ <di:waypoint xsi:type="dc:Point" x="1155" y="394" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="394" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1224.5" y="373" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceBRG.bpmn
new file mode 100644
index 0000000000..b10d6b1b18
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceBRG.bpmn
@@ -0,0 +1,422 @@
+<?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.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteAllottedResourceBRG" name="DoDeleteAllottedResourceBRG" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bfuk6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bfuk6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xm9g9s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.getAaiAR(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_0ymy62j</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="PreProcessSDNCDeactivate" targetRef="SDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCDeactivate" targetRef="PostProcessSDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCDeactivate" targetRef="ARFoundInSDNC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="PreProcessSDNCDelete" targetRef="SDNCDelete" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCDelete" targetRef="postProcessSDNCDelete" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCDelete" targetRef="PreProcessSDNCUnassign" />
+ <bpmn2:scriptTask id="PreProcessSDNCDeactivate" name="PreProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.preProcessSDNCDeactivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDeactivate" name="SDNC Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCDeactivate" name="PostProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeactivateResponse")
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.validateSDNCResp(execution, response, "deactivate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCDelete" name="PreProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>foundInSDNC</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.preProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDelete" name="SDNC Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeleteRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCDelete" name="PostProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.validateSDNCResp(execution, response, "delete" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCUnassign" name="PreProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06w33tk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.preProcessSDNCUnassign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCUnassign" name="SDNC Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncUnassignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncUnassignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_06w33tk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCUnassign" name="PostProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncUnassignResponse")
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.validateSDNCResp(execution, response, "unassign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_06w33tk" sourceRef="PreProcessSDNCUnassign" targetRef="SDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCUnassign" targetRef="PostProcessSDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCUnassign" targetRef="DeleteAAIAR" />
+ <bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Unexpected Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ibe7qx">
+ <bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ProcessError" name="Log/Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ProcessError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ProcessError" targetRef="EndEvent_1fgqhmi" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="DeleteAAIAR" name="Delete AAI AR " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:incoming>notFoundInSDNC</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ymy62j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.deleteAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ARFoundInSDNC" name="AR Found in SDNC?" default="foundInSDNC">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>foundInSDNC</bpmn2:outgoing>
+ <bpmn2:outgoing>notFoundInSDNC</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="PreProcessSDNCDeactivate" />
+ <bpmn2:scriptTask id="UpdateAAIARPendingDelete" name="Update AAI AR PendingDelete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xm9g9s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g4cl5f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceBRG ddar = new DoDeleteAllottedResourceBRG()
+ddar.updateAaiAROrchStatus(execution, "PendingDelete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v13nt6" name="To SDNCTasks">
+ <bpmn2:incoming>SequenceFlow_0g4cl5f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g4cl5f" sourceRef="UpdateAAIARPendingDelete" targetRef="IntermediateThrowEvent_0v13nt6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ymy62j" sourceRef="DeleteAAIAR" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="foundInSDNC" name="Yes" sourceRef="ARFoundInSDNC" targetRef="PreProcessSDNCDelete" />
+ <bpmn2:sequenceFlow id="notFoundInSDNC" name="No" sourceRef="ARFoundInSDNC" targetRef="DeleteAAIAR">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("ARNotFoundInSDNC" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bfuk6l" sourceRef="initialization" targetRef="GetAAIAR" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xm9g9s" sourceRef="GetAAIAR" targetRef="UpdateAAIARPendingDelete" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteAllottedResourceBRG">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="217" y="227" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235" y="268" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="336" y="203" 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="253" y="245" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="245" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="295" y="230" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
+ <dc:Bounds x="503" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1060" y="514" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1078" y="555" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="92" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="748" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="206" y="751.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="359" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="665" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="PreProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCDeactivate">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="PreProcessSDNCDelete">
+ <dc:Bounds x="309" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCDelete">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCDelete">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0zm728u_di" bpmnElement="PreProcessSDNCUnassign">
+ <dc:Bounds x="590" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCUnassign">
+ <dc:Bounds x="590" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCUnassign">
+ <dc:Bounds x="590" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_06w33tk_di" bpmnElement="SequenceFlow_06w33tk">
+ <di:waypoint xsi:type="dc:Point" x="640" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="640" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="754" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="729" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="690" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="532" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="797" y="663" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
+ <dc:Bounds x="107" y="897" width="521" height="191" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="204" y="970" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="481" y="970" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ProcessError">
+ <dc:Bounds x="311" y="948" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="240" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="988" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="276" y="973" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="411" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="481" y="988" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="465" y="988" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="DeleteAAIAR">
+ <dc:Bounds x="874" y="492" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="ARFoundInSDNC" isMarkerVisible="true">
+ <dc:Bounds x="181" y="520" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="128" y="461" width="63" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-70" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-79" y="568" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-34" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="4" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1k13o3m_di" bpmnElement="UpdateAAIARPendingDelete">
+ <dc:Bounds x="667" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0v13nt6_di" bpmnElement="IntermediateThrowEvent_0v13nt6">
+ <dc:Bounds x="837" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="234" width="71" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g4cl5f_di" bpmnElement="SequenceFlow_0g4cl5f">
+ <di:waypoint xsi:type="dc:Point" x="767" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="802" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ymy62j_di" bpmnElement="SequenceFlow_0ymy62j">
+ <di:waypoint xsi:type="dc:Point" x="974" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="1060" y="532" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1017" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_197vrli_di" bpmnElement="foundInSDNC">
+ <di:waypoint xsi:type="dc:Point" x="231" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="260" y="530" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ue1x4e_di" bpmnElement="notFoundInSDNC">
+ <di:waypoint xsi:type="dc:Point" x="206" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="406" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bfuk6l_di" bpmnElement="SequenceFlow_0bfuk6l">
+ <di:waypoint xsi:type="dc:Point" x="436" y="243" />
+ <di:waypoint xsi:type="dc:Point" x="503" y="243" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="228" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xm9g9s_di" bpmnElement="SequenceFlow_0xm9g9s">
+ <di:waypoint xsi:type="dc:Point" x="603" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceTXC.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceTXC.bpmn
new file mode 100644
index 0000000000..84895e225d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteAllottedResourceTXC.bpmn
@@ -0,0 +1,422 @@
+<?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.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteAllottedResourceTXC" name="DoDeleteAllottedResourceTXC" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bfuk6l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bfuk6l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xm9g9s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.getAaiAR(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_0ymy62j</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q6udwm" sourceRef="PreProcessSDNCDeactivate" targetRef="SDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15knw0q" sourceRef="SDNCDeactivate" targetRef="PostProcessSDNCDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0c5h00o" sourceRef="PostProcessSDNCDeactivate" targetRef="ARFoundInSDNC" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1lalmvp" sourceRef="PreProcessSDNCDelete" targetRef="SDNCDelete" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0eb41vb" sourceRef="SDNCDelete" targetRef="postProcessSDNCDelete" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15z3gpq" sourceRef="postProcessSDNCDelete" targetRef="PreProcessSDNCUnassign" />
+ <bpmn2:scriptTask id="PreProcessSDNCDeactivate" name="PreProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0gd64w9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.preProcessSDNCDeactivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDeactivate" name="SDNC Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1q6udwm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15knw0q</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCDeactivate" name="PostProcess SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15knw0q</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeactivateResponse")
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.validateSDNCResp(execution, response, "deactivate" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCDelete" name="PreProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>foundInSDNC</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.preProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCDelete" name="SDNC Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeleteRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1lalmvp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0eb41vb</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCDelete" name="PostProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0eb41vb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15z3gpq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.validateSDNCResp(execution, response, "delete" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PreProcessSDNCUnassign" name="PreProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06w33tk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.preProcessSDNCUnassign(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="SDNCUnassign" name="SDNC Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncUnassignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncUnassignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_06w33tk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s7yieq</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PostProcessSDNCUnassign" name="PostProcess SDNC Unassign" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1s7yieq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_00i7x43</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+String response = execution.getVariable("sdncUnassignResponse")
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.validateSDNCResp(execution, response, "unassign" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_06w33tk" sourceRef="PreProcessSDNCUnassign" targetRef="SDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1s7yieq" sourceRef="SDNCUnassign" targetRef="PostProcessSDNCUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_00i7x43" sourceRef="PostProcessSDNCUnassign" targetRef="DeleteAAIAR" />
+ <bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Unexpected Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ibe7qx">
+ <bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1fgqhmi">
+ <bpmn2:incoming>SequenceFlow_1kbzr5v</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ProcessError" name="Log/Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1h61pqs</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kbzr5v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1h61pqs" sourceRef="StartEvent_1ibe7qx" targetRef="ProcessError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1kbzr5v" sourceRef="ProcessError" targetRef="EndEvent_1fgqhmi" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="DeleteAAIAR" name="Delete AAI AR " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_00i7x43</bpmn2:incoming>
+ <bpmn2:incoming>notFoundInSDNC</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ymy62j</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.deleteAaiAR(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ARFoundInSDNC" name="AR Found in SDNC?" default="foundInSDNC">
+ <bpmn2:incoming>SequenceFlow_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>foundInSDNC</bpmn2:outgoing>
+ <bpmn2:outgoing>notFoundInSDNC</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1lqaeh8" name="SDNCTasks">
+ <bpmn2:outgoing>SequenceFlow_0gd64w9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0gd64w9" sourceRef="IntermediateCatchEvent_1lqaeh8" targetRef="PreProcessSDNCDeactivate" />
+ <bpmn2:scriptTask id="UpdateAAIARPendingDelete" name="Update AAI AR PendingDelete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xm9g9s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g4cl5f</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+
+DoDeleteAllottedResourceTXC ddar = new DoDeleteAllottedResourceTXC()
+ddar.updateAaiAROrchStatus(execution, "PendingDelete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0v13nt6" name="To SDNCTasks">
+ <bpmn2:incoming>SequenceFlow_0g4cl5f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="SDNCTasks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0g4cl5f" sourceRef="UpdateAAIARPendingDelete" targetRef="IntermediateThrowEvent_0v13nt6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ymy62j" sourceRef="DeleteAAIAR" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="foundInSDNC" name="Yes" sourceRef="ARFoundInSDNC" targetRef="PreProcessSDNCDelete" />
+ <bpmn2:sequenceFlow id="notFoundInSDNC" name="No" sourceRef="ARFoundInSDNC" targetRef="DeleteAAIAR">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("ARNotFoundInSDNC" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bfuk6l" sourceRef="initialization" targetRef="GetAAIAR" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xm9g9s" sourceRef="GetAAIAR" targetRef="UpdateAAIARPendingDelete" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteAllottedResourceTXC">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="217" y="227" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235" y="268" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="336" y="203" 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="253" y="245" />
+ <di:waypoint xsi:type="dc:Point" x="336" y="245" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="295" y="230" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
+ <dc:Bounds x="503" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1060" y="514" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1078" y="555" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
+ <di:waypoint xsi:type="dc:Point" x="92" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="609.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15knw0q_di" bpmnElement="SequenceFlow_15knw0q">
+ <di:waypoint xsi:type="dc:Point" x="92" y="710" />
+ <di:waypoint xsi:type="dc:Point" x="92" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="727.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="142" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="748" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="206" y="751.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lalmvp_di" bpmnElement="SequenceFlow_1lalmvp">
+ <di:waypoint xsi:type="dc:Point" x="359" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eb41vb_di" bpmnElement="SequenceFlow_0eb41vb">
+ <di:waypoint xsi:type="dc:Point" x="359" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="725" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="725" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z3gpq_di" bpmnElement="SequenceFlow_15z3gpq">
+ <di:waypoint xsi:type="dc:Point" x="409" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="665" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01h1rx2_di" bpmnElement="PreProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0p5ncd0_di" bpmnElement="SDNCDeactivate">
+ <dc:Bounds x="42" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qa39wn_di" bpmnElement="PostProcessSDNCDeactivate">
+ <dc:Bounds x="42" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rr2xrc_di" bpmnElement="PreProcessSDNCDelete">
+ <dc:Bounds x="309" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="SDNCDelete">
+ <dc:Bounds x="309" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCDelete">
+ <dc:Bounds x="309" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0zm728u_di" bpmnElement="PreProcessSDNCUnassign">
+ <dc:Bounds x="590" y="505" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1uhgd2e_di" bpmnElement="SDNCUnassign">
+ <dc:Bounds x="590" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rrv9dw_di" bpmnElement="PostProcessSDNCUnassign">
+ <dc:Bounds x="590" y="754" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_06w33tk_di" bpmnElement="SequenceFlow_06w33tk">
+ <di:waypoint xsi:type="dc:Point" x="640" y="585" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="604.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s7yieq_di" bpmnElement="SequenceFlow_1s7yieq">
+ <di:waypoint xsi:type="dc:Point" x="640" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="754" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="655" y="729" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00i7x43_di" bpmnElement="SequenceFlow_00i7x43">
+ <di:waypoint xsi:type="dc:Point" x="690" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="794" />
+ <di:waypoint xsi:type="dc:Point" x="782" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="532" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="797" y="663" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
+ <dc:Bounds x="107" y="897" width="521" height="191" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1ibe7qx_di" bpmnElement="StartEvent_1ibe7qx">
+ <dc:Bounds x="204" y="970" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fgqhmi_di" bpmnElement="EndEvent_1fgqhmi">
+ <dc:Bounds x="481" y="970" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ji3121_di" bpmnElement="ProcessError">
+ <dc:Bounds x="311" y="948" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h61pqs_di" bpmnElement="SequenceFlow_1h61pqs">
+ <di:waypoint xsi:type="dc:Point" x="240" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="988" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="276" y="973" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kbzr5v_di" bpmnElement="SequenceFlow_1kbzr5v">
+ <di:waypoint xsi:type="dc:Point" x="411" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="988" />
+ <di:waypoint xsi:type="dc:Point" x="481" y="988" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="465" y="988" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_16x97wp_di" bpmnElement="DeleteAAIAR">
+ <dc:Bounds x="874" y="492" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0hxis7t_di" bpmnElement="ARFoundInSDNC" isMarkerVisible="true">
+ <dc:Bounds x="181" y="520" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="128" y="461" width="63" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1lqaeh8_di" bpmnElement="IntermediateCatchEvent_1lqaeh8">
+ <dc:Bounds x="-70" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-79" y="568" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gd64w9_di" bpmnElement="SequenceFlow_0gd64w9">
+ <di:waypoint xsi:type="dc:Point" x="-34" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="42" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="4" y="530" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1k13o3m_di" bpmnElement="UpdateAAIARPendingDelete">
+ <dc:Bounds x="667" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0v13nt6_di" bpmnElement="IntermediateThrowEvent_0v13nt6">
+ <dc:Bounds x="837" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="234" width="71" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g4cl5f_di" bpmnElement="SequenceFlow_0g4cl5f">
+ <di:waypoint xsi:type="dc:Point" x="767" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="802" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ymy62j_di" bpmnElement="SequenceFlow_0ymy62j">
+ <di:waypoint xsi:type="dc:Point" x="974" y="532" />
+ <di:waypoint xsi:type="dc:Point" x="1060" y="532" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1017" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_197vrli_di" bpmnElement="foundInSDNC">
+ <di:waypoint xsi:type="dc:Point" x="231" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="545" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="260" y="530" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ue1x4e_di" bpmnElement="notFoundInSDNC">
+ <di:waypoint xsi:type="dc:Point" x="206" y="520" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="421" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="492" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="406" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bfuk6l_di" bpmnElement="SequenceFlow_0bfuk6l">
+ <di:waypoint xsi:type="dc:Point" x="436" y="243" />
+ <di:waypoint xsi:type="dc:Point" x="503" y="243" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="228" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xm9g9s_di" bpmnElement="SequenceFlow_0xm9g9s">
+ <di:waypoint xsi:type="dc:Point" x="603" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..a975ebdee0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
@@ -0,0 +1,378 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoDeleteE2EServiceInstance" name="All Resources Deleted" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_06phzgv" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11e6bfy</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteE2EServiceInstance()
+ddsi.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <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 DoDeleteE2EServiceInstance()
+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_1cevtpy</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0e7inkl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.deleteServiceInstance(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_1u8zt9i" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0sf5lpt">
+ <bpmn:outgoing>SequenceFlow_1921mo3</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_06utmg4">
+ <bpmn:incoming>SequenceFlow_18vlzfo</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0nha3pr" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1921mo3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18vlzfo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1921mo3" name="" sourceRef="StartEvent_0sf5lpt" targetRef="ScriptTask_0nha3pr" />
+ <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_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" />
+ <bpmn:scriptTask id="ScriptTask_146jt8v" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1961633</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ym9otf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteE2EServiceInstance()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_00tg69u" name="Init Resource Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_openecomp_db_endpoint}</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_initResOperStatusRequest}</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_1ym9otf</bpmn:incoming>
+ <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:sequenceFlow id="SequenceFlow_1j08ko3" sourceRef="ServiceTask_00tg69u" targetRef="Task_1f5dlsv" />
+ <bpmn:sequenceFlow id="SequenceFlow_0fo5vw5" sourceRef="Task_1ldvug1" targetRef="Task_0mhdfuu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0orw2f8" sourceRef="Task_0mhdfuu" targetRef="Task_1yx1n05" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ha8ix9" sourceRef="Task_1yx1n05" targetRef="IntermediateThrowEvent_0ve5ukt" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0ve5ukt" name="Go to Delete Resources">
+ <bpmn:incoming>SequenceFlow_0ha8ix9</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartDeleteResource" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:intermediateCatchEvent id="startDeleteResources" name="Start Delete Resources">
+ <bpmn:outgoing>SequenceFlow_1961633</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="StartDeleteResource" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1961633" sourceRef="startDeleteResources" targetRef="ScriptTask_146jt8v" />
+ <bpmn:scriptTask id="Task_1ldvug1" name="Prepare Decompose Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1q2mqnm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0fo5vw5</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoDeleteE2EServiceInstance()
+dcsi.prepareDecomposeService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_0mhdfuu" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="requestParameters" target="requestParameters" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0fo5vw5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0orw2f8</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1yx1n05" name="Post Decompose Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0orw2f8</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ha8ix9</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi= new DoDeleteE2EServiceInstance()
+dcsi.postDecomposeService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_1f5dlsv" name="Delete Resources" calledElement="DoDeleteResourcesV1">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:in source="deleteResourceList" target="deleteResourceList" />
+ <camunda:in source="resourceInstanceIDs" target="resourceInstanceIDs" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1cevtpy</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1cevtpy" sourceRef="Task_1f5dlsv" targetRef="ScriptTask_01erufg" />
+ <bpmn:intermediateCatchEvent id="DecomposeService" name="Decompose Service">
+ <bpmn:outgoing>SequenceFlow_1q2mqnm</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="DecomposeService" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1q2mqnm" sourceRef="DecomposeService" targetRef="Task_1ldvug1" />
+ <bpmn:intermediateThrowEvent id="StartEvent_1qh5a34" name="Go to Decompse Service">
+ <bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming>
+ <bpmn:linkEventDefinition name="DecomposeService" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="StartEvent_1qh5a34" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r">
+ <dc:Bounds x="-537" y="-51" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-544" y="-10" width="52" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_06phzgv_di" bpmnElement="ScriptTask_06phzgv">
+ <dc:Bounds x="-449" y="-73" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26">
+ <dc:Bounds x="543" y="472" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="471" y="513" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
+ <dc:Bounds x="-109" y="-73" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg">
+ <dc:Bounds x="254" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true">
+ <dc:Bounds x="-166" y="672" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9">
+ <di:waypoint xsi:type="dc:Point" x="-501" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-475" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-475" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-449" y="-33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-505" y="-39" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy">
+ <di:waypoint xsi:type="dc:Point" x="-349" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-318" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-318" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-286" y="-33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-348" y="-39" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
+ <di:waypoint xsi:type="dc:Point" x="354" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="403.5" y="469" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt">
+ <dc:Bounds x="-98" y="739" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-170" y="780" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4">
+ <dc:Bounds x="195" y="739" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="123" y="780" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr">
+ <dc:Bounds x="6" y="717" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3">
+ <di:waypoint xsi:type="dc:Point" x="-62" y="757" />
+ <di:waypoint xsi:type="dc:Point" x="6" y="757" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-118" y="742" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo">
+ <di:waypoint xsi:type="dc:Point" x="106" y="757" />
+ <di:waypoint xsi:type="dc:Point" x="195" y="757" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="62" y="742" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v">
+ <dc:Bounds x="-422" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u">
+ <dc:Bounds x="-229" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf">
+ <di:waypoint xsi:type="dc:Point" x="-322" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="-229" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-320.5" y="469" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
+ <dc:Bounds x="-286" y="-73" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
+ <di:waypoint xsi:type="dc:Point" x="-186" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-154" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-154" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="-109" y="-33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-184" y="-39" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j08ko3_di" bpmnElement="SequenceFlow_1j08ko3">
+ <di:waypoint xsi:type="dc:Point" x="-129" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="-1" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-110" y="469" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fo5vw5_di" bpmnElement="SequenceFlow_0fo5vw5">
+ <di:waypoint xsi:type="dc:Point" x="-278" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-254" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-254" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-178" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-284" y="192" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0orw2f8_di" bpmnElement="SequenceFlow_0orw2f8">
+ <di:waypoint xsi:type="dc:Point" x="-78" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-49" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-49" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="47" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-79" y="192" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ha8ix9_di" bpmnElement="SequenceFlow_0ha8ix9">
+ <di:waypoint xsi:type="dc:Point" x="147" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="192" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_15myvzx_di" bpmnElement="IntermediateThrowEvent_0ve5ukt">
+ <dc:Bounds x="246" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="233" y="220" width="64" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1jcfnjr_di" bpmnElement="startDeleteResources">
+ <dc:Bounds x="-537" y="472" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-549" y="512" width="60" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1961633_di" bpmnElement="SequenceFlow_1961633">
+ <di:waypoint xsi:type="dc:Point" x="-501" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="-422" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-461.5" y="469" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_079nac8_di" bpmnElement="Task_1ldvug1">
+ <dc:Bounds x="-378" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_01b12fk_di" bpmnElement="Task_0mhdfuu">
+ <dc:Bounds x="-178" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0msjtc4_di" bpmnElement="Task_1yx1n05">
+ <dc:Bounds x="47" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_16sm2op_di" bpmnElement="Task_1f5dlsv">
+ <dc:Bounds x="-1" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1cevtpy_di" bpmnElement="SequenceFlow_1cevtpy">
+ <di:waypoint xsi:type="dc:Point" x="99" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="254" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131.5" y="469" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0s6bb2d_di" bpmnElement="DecomposeService">
+ <dc:Bounds x="-537" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-550" y="220" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q2mqnm_di" bpmnElement="SequenceFlow_1q2mqnm">
+ <di:waypoint xsi:type="dc:Point" x="-501" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="-378" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-484" y="177" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1j1awcj_di" bpmnElement="StartEvent_1qh5a34">
+ <dc:Bounds x="71" y="-51" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="46" y="-11" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6">
+ <di:waypoint xsi:type="dc:Point" x="-9" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="14" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="14" y="-33" />
+ <di:waypoint xsi:type="dc:Point" x="71" y="-33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-16" y="-39" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn
new file mode 100644
index 0000000000..d6069d714e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn
@@ -0,0 +1,933 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteNetworkInstance" name="DoDeleteNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="ScriptTask_01w2cd9" />
+ <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query In AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0msqfwu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def callRESTDeleteAAI = new DoDeleteNetworkInstance()
+callRESTDeleteAAI.callRESTQueryAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isRelationshipExists_ExclusiveGateway" />
+ <bpmn2:callActivity id="callDeleteSDNCAdapter_CallActivity" name="Call SDNC Unassign Adapter V1 Sub-process" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deleteSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deleteSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1pdp4d2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callDeleteSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1jnva78</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def validateSDNCResponse = new DoDeleteNetworkInstance()
+validateSDNCResponse.validateSDNCResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoDeleteOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_87" errorRef="Error_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="BoundaryEvent_1" targetRef="sndcError_EndEvent" />
+ <bpmn2:exclusiveGateway id="isSdncTopoDeleteOk_ExclusiveGateway" name="Is SDNC Unassign Ok?" default="sdncTopoDeleteNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoDeleteNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoDeleteYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:incoming>sdncTopoDeleteNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="sdncTopoDeleteNo_SequenceFlow" name="No" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoDeleteYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="ScriptTask_01xjfhu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception" triggeredByEvent="true">
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_1a51h25</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_3" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_1yvnovn</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_00lgy9f" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1nl99y6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yvnovn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1a51h25" sourceRef="subProcessStart_StartEvent" targetRef="Task_0026x4v" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yvnovn" sourceRef="ScriptTask_00lgy9f" targetRef="EndEvent_2" />
+ <bpmn2:scriptTask id="ScriptTask_0n4do0p" name="Prepare SDNC RPC Rollback Deactivate" scriptFormat="groovy">
+ <bpmn2:outgoing>SequenceFlow_1wif0e5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1gix2o6" name="Is Rollback On?">
+ <bpmn2:incoming>SequenceFlow_021b0sz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0tiz0kk</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1suj1nc</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tiz0kk" name="Yes" sourceRef="ExclusiveGateway_1gix2o6" targetRef="ExclusiveGateway_1x7o5bo">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1suj1nc" name="No" sourceRef="ExclusiveGateway_1gix2o6" targetRef="ExclusiveGateway_01xin16" />
+ <bpmn2:callActivity id="CallActivity_0lku52d" name="DoDelete NetworkInstanceRollback&#10;" calledElement="DoDeleteNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_147vc14</bpmn2:incoming>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1x7o5bo" name="is SDNC Rollback Needed? " default="SequenceFlow_1raa09h">
+ <bpmn2:incoming>SequenceFlow_0tiz0kk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0jb7rws</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1raa09h</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jb7rws" name="Yes" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ExclusiveGateway_01xin16">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSdncDeactivateRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_01xin16">
+ <bpmn2:incoming>SequenceFlow_1suj1nc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1raa09h</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0jb7rws</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1nl99y6</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1raa09h" sourceRef="ExclusiveGateway_1x7o5bo" targetRef="ExclusiveGateway_01xin16" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1nl99y6" sourceRef="ExclusiveGateway_01xin16" targetRef="ScriptTask_00lgy9f" />
+ <bpmn2:scriptTask id="ScriptTask_0n4ya47" name="Prepare RollbackData" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1wif0e5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_147vc14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wif0e5" sourceRef="ScriptTask_0n4do0p" targetRef="ScriptTask_0n4ya47" />
+ <bpmn2:sequenceFlow id="SequenceFlow_147vc14" sourceRef="ScriptTask_0n4ya47" targetRef="CallActivity_0lku52d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_021b0sz" sourceRef="Task_0026x4v" targetRef="ExclusiveGateway_1gix2o6" />
+ <bpmn2:scriptTask id="Task_0026x4v" name="Set Exception Flag" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1a51h25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_021b0sz</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.setExceptionFlag(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:textAnnotation id="TextAnnotation_0i06ryl"> <bpmn2:text>Rollback Not Needed for Delete.</bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_0gzsxad" sourceRef="CallActivity_0lku52d" targetRef="TextAnnotation_0i06ryl" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="isAAIQueryOk_ExclusiveGateway_2" name="Is AAI Query Ok?" default="querySuccessNo_SequenceFlow">
+ <bpmn2:incoming>isRelationshipExistNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>querySuccessYes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>querySuccessNo_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="querySuccessYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isResponseEmpty_ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isAAIGood") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="querySuccessNo_SequenceFlow" name="No" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isReturnCode404_ExclusiveGateway" />
+ <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Return Code 404?" default="isReturnCode404_No_SequenceFlow">
+ <bpmn2:incoming>querySuccessNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent" />
+ <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="silentSucces_InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_aaiReturnCode" ) == "404"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Error">
+ <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="isResponseEmpty_ExclusiveGateway_2" name="Is Resp Empty?" default="isResponseEmptyNo_SequenceFlow">
+ <bpmn2:incoming>querySuccessYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isResponseEmptyNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isResponseEmptyYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isResponseEmptyNo_SequenceFlow" name="No" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="callRESTQueryCloudRegion_ScriptTask" />
+ <bpmn2:sequenceFlow id="isResponseEmptyYes_SequenceFlow" name="Yes" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="silentSucces_InclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSilentSuccess") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:inclusiveGateway id="silentSucces_InclusiveGateway" name="Joint">
+ <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isResponseEmptyYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>silentSuccess_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="silentSuccess_SequenceFlow" name="Silent Success" sourceRef="silentSucces_InclusiveGateway" targetRef="ScriptTask_0dtzzht" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_0f25bme</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>isResponseEmptyNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteNetMod = new DoDeleteNetworkInstance()
+deleteNetMod.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:exclusiveGateway id="isRelationshipExists_ExclusiveGateway" name="Is Relationship Exists?" default="isRelationshipExistNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>isRelationshipExistNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isRelationshipExistYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRelationshipExistNo_SequenceFlow" name="No" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="isAAIQueryOk_ExclusiveGateway_2" />
+ <bpmn2:sequenceFlow id="isRelationshipExistYes_SequenceFlow" name="Yes" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="relationshipError_EndEvent">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isVfRelationshipExist") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="relationshipError_EndEvent" name="Relationship Error">
+ <bpmn2:incoming>isRelationshipExistYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1pbgnr2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0r3pvf8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pdp4d2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def prepareSDNCRequest = new DoDeleteNetworkInstance()
+prepareSDNCRequest.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="validateDeletePONetwork_ScriptTask" name="Validate Delete PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def validateNetworkResponse = new DoDeleteNetworkInstance()
+validateNetworkResponse.validateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="validateDeletePONetwork_ScriptTask" targetRef="ExclusiveGateway_02t94x3" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def prepareNetworkRequest = new DoDeleteNetworkInstance()
+prepareNetworkRequest.prepareNetworkRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="sendRequestToNewworkAdapater_ScriptTask" />
+ <bpmn2:scriptTask id="sendRequestToNewworkAdapater_ScriptTask" name="Send Request to Network Adapter" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def prepareNetworkRequest = new DoDeleteNetworkInstance()
+prepareNetworkRequest.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="sendRequestToNewworkAdapater_ScriptTask" targetRef="validateDeletePONetwork_ScriptTask" />
+ <bpmn2:subProcess id="SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_91" errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="unexpectedError_DeleteNetworkInfra_ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteNetMod = new DoDeleteNetworkInstance()
+deleteNetMod.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_1" targetRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="ScriptTask_01xjfhu" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoDeleteYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pbgnr2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1pbgnr2" sourceRef="ScriptTask_01xjfhu" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pdp4d2" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callDeleteSDNCAdapter_CallActivity" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_02t94x3" name="is not &#39;1610&#39; SNDC Call?" default="SequenceFlow_0r3pvf8">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0r3pvf8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0kqnddy</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0r3pvf8" name="No" sourceRef="ExclusiveGateway_02t94x3" targetRef="prepareSDNCTopoRequest_ScriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0iqzbz6" name="Prepare RSRC SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0f13b17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0zlbzad</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def prepareSDNCRequest = new DoDeleteNetworkInstance()
+prepareSDNCRequest.prepareRpcSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_03wzdas" name="Call RSRC SDNC Unassign Adapter V1 " calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deleteSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deleteSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_sdncReturnCode" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0zlbzad</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jnva78</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jnva78" sourceRef="CallActivity_03wzdas" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0zlbzad" sourceRef="ScriptTask_0iqzbz6" targetRef="CallActivity_03wzdas" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0kqnddy" name="Yes" sourceRef="ExclusiveGateway_02t94x3" targetRef="ScriptTask_1wf192s">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_01w2cd9" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0msqfwu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0msqfwu" sourceRef="ScriptTask_01w2cd9" targetRef="callAAIQuery_scriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0dtzzht" name="PostProcess Response" scriptFormat="groovy">
+ <bpmn2:incoming>silentSuccess_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0f25bme</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0f25bme" sourceRef="ScriptTask_0dtzzht" targetRef="EndEvent_1" />
+ <bpmn2:callActivity id="CallActivity_0wyu1mx" name="Call RSRC SDNC Deactivate Adapter" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DELNWKI_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_deactivateSdncReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKI_deactivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1o088sy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1i3193l</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1wf192s" name="Prepare SDNC RSRC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0kqnddy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1o088sy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.prepareRpcSDNCDeactivate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1o088sy" sourceRef="ScriptTask_1wf192s" targetRef="CallActivity_0wyu1mx" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_024qvqd" default="SequenceFlow_1qyo7ot">
+ <bpmn2:incoming>SequenceFlow_0n8sf23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qyo7ot</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0f13b17</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_00vwf2h" name="Validate Deactivate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1i3193l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0n8sf23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:boundaryEvent id="BoundaryEvent_0un9yyu" name="" attachedToRef="ScriptTask_00vwf2h">
+ <bpmn2:outgoing>SequenceFlow_08hus4u</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_3" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i3193l" sourceRef="CallActivity_0wyu1mx" targetRef="ScriptTask_00vwf2h" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0n8sf23" sourceRef="ScriptTask_00vwf2h" targetRef="ExclusiveGateway_024qvqd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_08hus4u" sourceRef="BoundaryEvent_0un9yyu" targetRef="EndEvent_1l210ae" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qyo7ot" name="No" sourceRef="ExclusiveGateway_024qvqd" targetRef="EndEvent_1l210ae" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0f13b17" name="Yes" sourceRef="ExclusiveGateway_024qvqd" targetRef="ScriptTask_0iqzbz6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_1l210ae">
+ <bpmn2:incoming>SequenceFlow_08hus4u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1qyo7ot</bpmn2:incoming>
+ <bpmn2:errorEventDefinition errorRef="Error_3" />
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_3" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+ <dc:Bounds x="444" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="226" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47">
+ <di:waypoint xsi:type="dc:Point" x="480" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="204" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="539" y="188.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds x="816" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryOk_ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="984" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="966" y="44" width="87" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_224">
+ <di:waypoint xsi:type="dc:Point" x="866" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="122" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="862" y="135" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateDeletePONetwork_ScriptTask">
+ <dc:Bounds x="1131" y="509" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="querySuccessYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_65">
+ <di:waypoint xsi:type="dc:Point" x="1009" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1009" y="177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1008" y="120" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="querySuccessNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1126" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1115" y="41" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="98" />
+ <di:waypoint xsi:type="dc:Point" x="1281" y="98" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1176" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1151" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1151" y="177" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1152" y="120" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_65" bpmnElement="isResponseEmpty_ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="984" y="177" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1016" y="163" width="95" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="isResponseEmptyNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_ScriptTask_250">
+ <di:waypoint xsi:type="dc:Point" x="1009" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1010" y="269" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1016" y="227" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="isResponseEmptyYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="202" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1034" y="202" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
+ <dc:Bounds x="1281" y="80" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1270" y="121" width="59" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_66" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1131" y="269" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_66" targetElement="_BPMNShape_ScriptTask_242">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="349" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="387" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="368" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="981" y="718" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="589" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="648" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="603.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="-1" y="576" width="902" height="448" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="49" y="896" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="43" y="938" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoDeleteOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1156" y="997" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1070" y="1010" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoDeleteNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1206" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1244" y="1022" />
+ <di:waypoint xsi:type="dc:Point" x="1278" y="1022" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1206" y="1029.0213702128942" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoDeleteYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1047" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1097" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="1053.3920491579422" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1278" y="1004" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1289" y="1047" width="59" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callDeleteSDNCAdapter_CallActivity">
+ <dc:Bounds x="981" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+ <di:waypoint xsi:type="dc:Point" x="1081" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1106" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_242" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="467" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="509" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="488" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_2" bpmnElement="silentSucces_InclusiveGateway">
+ <dc:Bounds x="1126" y="177" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1136" y="227" width="33" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="silentSuccess_SequenceFlow" sourceElement="_BPMNShape_InclusiveGateway_2">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="1305" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1195" y="180.7648701031734" width="72" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1131" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="931" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="997" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="949" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="sendRequestToNewworkAdapater_ScriptTask">
+ <dc:Bounds x="1131" y="387" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1458" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1476" y="226" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_2">
+ <dc:Bounds x="817" y="687" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="728" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_182" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1163" y="1228" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="1269" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_250" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="960" y="269" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_52" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_250" targetElement="_BPMNShape_ScriptTask_66">
+ <di:waypoint xsi:type="dc:Point" x="1060" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="309" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="309" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="309" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_41" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="1213" y="913" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1231" y="949" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_BoundaryEvent_41" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1241" y="945" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="1007" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1264" y="961" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="isRelationshipExists_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="840" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="829" y="41" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="isRelationshipExistNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_62">
+ <di:waypoint xsi:type="dc:Point" x="890" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="97" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="relationshipError_EndEvent">
+ <dc:Bounds x="730" y="80" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="117" width="109" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_61" bpmnElement="isRelationshipExistYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_EndEvent_216">
+ <di:waypoint xsi:type="dc:Point" x="840" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="800" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="800" y="98" />
+ <di:waypoint xsi:type="dc:Point" x="766" y="98" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="816" y="97" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_29" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="0" y="369" width="326" height="175" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_73" bpmnElement="StartEvent_1">
+ <dc:Bounds x="36" y="432" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="54" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_222" bpmnElement="EndEvent_4">
+ <dc:Bounds x="240" y="432" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="unexpectedError_DeleteNetworkInfra_ScriptTask_1">
+ <dc:Bounds x="108" y="410" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_73" targetElement="_BPMNShape_ScriptTask_272">
+ <di:waypoint xsi:type="dc:Point" x="72" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="108" y="450" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_222">
+ <di:waypoint xsi:type="dc:Point" x="208" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="240" y="450" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00lgy9f_di" bpmnElement="ScriptTask_00lgy9f">
+ <dc:Bounds x="688" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a51h25_di" bpmnElement="SequenceFlow_1a51h25">
+ <di:waypoint xsi:type="dc:Point" x="85" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="124" y="914" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="899" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yvnovn_di" bpmnElement="SequenceFlow_1yvnovn">
+ <di:waypoint xsi:type="dc:Point" x="788" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="803" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01xjfhu_di" bpmnElement="ScriptTask_01xjfhu">
+ <dc:Bounds x="1131" y="1097" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pbgnr2_di" bpmnElement="SequenceFlow_1pbgnr2">
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1177" />
+ <di:waypoint xsi:type="dc:Point" x="1181" y="1228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1196" y="1202.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pdp4d2_di" bpmnElement="SequenceFlow_1pdp4d2">
+ <di:waypoint xsi:type="dc:Point" x="1031" y="798" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="851" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1046" y="824.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_02t94x3_di" bpmnElement="ExclusiveGateway_02t94x3" isMarkerVisible="true">
+ <dc:Bounds x="1156" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1150" y="707" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r3pvf8_di" bpmnElement="SequenceFlow_0r3pvf8">
+ <di:waypoint xsi:type="dc:Point" x="1156" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1031" y="718" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="681" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0iqzbz6_di" bpmnElement="ScriptTask_0iqzbz6">
+ <dc:Bounds x="1426" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_03wzdas_di" bpmnElement="CallActivity_03wzdas">
+ <dc:Bounds x="1279" y="851" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jnva78_di" bpmnElement="SequenceFlow_1jnva78">
+ <di:waypoint xsi:type="dc:Point" x="1279" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1231" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1255" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zlbzad_di" bpmnElement="SequenceFlow_0zlbzad">
+ <di:waypoint xsi:type="dc:Point" x="1426" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1379" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1403" y="876" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kqnddy_di" bpmnElement="SequenceFlow_0kqnddy">
+ <di:waypoint xsi:type="dc:Point" x="1206" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1279" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1217" y="677.9562629793824" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_01w2cd9_di" bpmnElement="ScriptTask_01w2cd9">
+ <dc:Bounds x="597" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0msqfwu_di" bpmnElement="SequenceFlow_0msqfwu">
+ <di:waypoint xsi:type="dc:Point" x="697" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="757" y="188" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0dtzzht_di" bpmnElement="ScriptTask_0dtzzht">
+ <dc:Bounds x="1305" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f25bme_di" bpmnElement="SequenceFlow_0f25bme">
+ <di:waypoint xsi:type="dc:Point" x="1405" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="1458" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1432" y="178" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0wyu1mx_di" bpmnElement="CallActivity_0wyu1mx">
+ <dc:Bounds x="1426" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1wf192s_di" bpmnElement="ScriptTask_1wf192s">
+ <dc:Bounds x="1279" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o088sy_di" bpmnElement="SequenceFlow_1o088sy">
+ <di:waypoint xsi:type="dc:Point" x="1379" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1403" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1403" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1426" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1418" y="673" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_024qvqd_di" bpmnElement="ExclusiveGateway_024qvqd" isMarkerVisible="true">
+ <dc:Bounds x="1597" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1622" y="825" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00vwf2h_di" bpmnElement="ScriptTask_00vwf2h">
+ <dc:Bounds x="1572" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0un9yyu_di" bpmnElement="BoundaryEvent_0un9yyu">
+ <dc:Bounds x="1654" y="695" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1672" y="731" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i3193l_di" bpmnElement="SequenceFlow_1i3193l">
+ <di:waypoint xsi:type="dc:Point" x="1526" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1572" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1549" y="648" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n8sf23_di" bpmnElement="SequenceFlow_0n8sf23">
+ <di:waypoint xsi:type="dc:Point" x="1622" y="713" />
+ <di:waypoint xsi:type="dc:Point" x="1622" y="775" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1637" y="734" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_08hus4u_di" bpmnElement="SequenceFlow_08hus4u">
+ <di:waypoint xsi:type="dc:Point" x="1680" y="729" />
+ <di:waypoint xsi:type="dc:Point" x="1710" y="784" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1695" y="741.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qyo7ot_di" bpmnElement="SequenceFlow_1qyo7ot">
+ <di:waypoint xsi:type="dc:Point" x="1647" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1651" y="808" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f13b17_di" bpmnElement="SequenceFlow_0f13b17">
+ <di:waypoint xsi:type="dc:Point" x="1622" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="1622" y="891" />
+ <di:waypoint xsi:type="dc:Point" x="1526" y="891" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1629" y="824" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0p7ad9r_di" bpmnElement="EndEvent_1l210ae">
+ <dc:Bounds x="1700" y="782" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1718" y="818" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0n4do0p_di" bpmnElement="ScriptTask_0n4do0p">
+ <dc:Bounds x="245" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1gix2o6_di" bpmnElement="ExclusiveGateway_1gix2o6" isMarkerVisible="true">
+ <dc:Bounds x="270" y="889" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="939" width="77" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tiz0kk_di" bpmnElement="SequenceFlow_0tiz0kk">
+ <di:waypoint xsi:type="dc:Point" x="295" y="889" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="869" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="869" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="849" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="299" y="858.4545454545455" width="19" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1suj1nc_di" bpmnElement="SequenceFlow_1suj1nc">
+ <di:waypoint xsi:type="dc:Point" x="320" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="849" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="897" width="14" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0lku52d_di" bpmnElement="CallActivity_0lku52d">
+ <dc:Bounds x="523" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x7o5bo_di" bpmnElement="ExclusiveGateway_1x7o5bo" isMarkerVisible="true">
+ <dc:Bounds x="270" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="173" y="812" width="87" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jb7rws_di" bpmnElement="SequenceFlow_0jb7rws">
+ <di:waypoint xsi:type="dc:Point" x="295" y="799" />
+ <di:waypoint xsi:type="dc:Point" x="295" y="772" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="772" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="799" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="312" y="776.0384854424079" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_17qke2s_di" bpmnElement="ExclusiveGateway_01xin16">
+ <dc:Bounds x="412" y="799" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="849" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1raa09h_di" bpmnElement="SequenceFlow_1raa09h">
+ <di:waypoint xsi:type="dc:Point" x="320" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="412" y="824" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nl99y6_di" bpmnElement="SequenceFlow_1nl99y6">
+ <di:waypoint xsi:type="dc:Point" x="462" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="824" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="745" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="600" y="809" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0n4ya47_di" bpmnElement="ScriptTask_0n4ya47">
+ <dc:Bounds x="387" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wif0e5_di" bpmnElement="SequenceFlow_1wif0e5">
+ <di:waypoint xsi:type="dc:Point" x="345" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_147vc14_di" bpmnElement="SequenceFlow_147vc14">
+ <di:waypoint xsi:type="dc:Point" x="487" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_021b0sz_di" bpmnElement="SequenceFlow_021b0sz">
+ <di:waypoint xsi:type="dc:Point" x="224" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="270" y="914" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="247" y="899" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gtl61j_di" bpmnElement="Task_0026x4v">
+ <dc:Bounds x="124" y="874" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0i06ryl_di" bpmnElement="TextAnnotation_0i06ryl">
+ <dc:Bounds x="592" y="596" width="106" height="45" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0gzsxad_di" bpmnElement="Association_0gzsxad">
+ <di:waypoint xsi:type="dc:Point" x="606" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="641" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..7ec02addfa
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
@@ -0,0 +1,547 @@
+<?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.4.0">
+ <bpmn:process id="DoDeleteNetworkInstanceRollback" name="DoDeleteNetworkInstanceRollback" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0p5zgdb" />
+ <bpmn:callActivity id="CallActivity_1x88fsq" name="Call RSRC SDNC Activate Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackDeactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackDeactivateSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackDeactivateSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1mxbdps</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07s5r14</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0p5zgdb" name="is RSRC Deactivate Rollback?" default="SequenceFlow_1bb7zpp">
+ <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1bb7zpp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1mxbdps</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1xokvq6</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1xs882r</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ucaagl</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1bb7zpp" name="No" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="ExclusiveGateway_03d5sol" />
+ <bpmn:sequenceFlow id="SequenceFlow_1mxbdps" name="Yes" sourceRef="ExclusiveGateway_0p5zgdb" targetRef="CallActivity_1x88fsq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackDeactivateSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_07s5r14" sourceRef="CallActivity_1x88fsq" targetRef="ExclusiveGateway_03d5sol" />
+ <bpmn:endEvent id="EndEvent_1fvr7ad">
+ <bpmn:incoming>SequenceFlow_1ucaagl</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1eyt8z2" sourceRef="ServiceTask_1vx8ti9" targetRef="ExclusiveGateway_03fn5ks" />
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+DoDeleteNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_1" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_0798yby">
+ <bpmn:incoming>SequenceFlow_1hcmrh9</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1pi168e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xs882r</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1xs882r" sourceRef="ExclusiveGateway_0798yby" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03d5sol" name="is PO Network Rollback?" default="SequenceFlow_1yj3542">
+ <bpmn:incoming>SequenceFlow_1bb7zpp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_07s5r14</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yj3542</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_18e00sw</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1yj3542" name="No" sourceRef="ExclusiveGateway_03d5sol" targetRef="ExclusiveGateway_03fn5ks" />
+ <bpmn:serviceTask id="ServiceTask_1vx8ti9" name="Call Rollback Network">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${DELNWKIR_rollbackNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="DELNWKIR_rollbackNetworkResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="DELNWKIR_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_18e00sw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1eyt8z2</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_18e00sw" name="Yes" sourceRef="ExclusiveGateway_03d5sol" targetRef="ServiceTask_1vx8ti9">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03fn5ks" name="is SDNC Rollback?" default="SequenceFlow_1xokvq6">
+ <bpmn:incoming>SequenceFlow_1yj3542</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1eyt8z2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1xokvq6</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_172safw</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1ga27si" name="is RSRC SDNC?" default="SequenceFlow_1wy1aba">
+ <bpmn:incoming>SequenceFlow_172safw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wy1aba</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1yltkyg</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1xokvq6" name="No" sourceRef="ExclusiveGateway_03fn5ks" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_172safw" name="Yes" sourceRef="ExclusiveGateway_03fn5ks" targetRef="ExclusiveGateway_1ga27si">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1wy1aba" name="No" sourceRef="ExclusiveGateway_1ga27si" targetRef="Task_00chyig" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yltkyg" name="Yes" sourceRef="ExclusiveGateway_1ga27si" targetRef="Task_1iuumxi">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1hcmrh9" sourceRef="Task_1iuumxi" targetRef="ExclusiveGateway_0798yby" />
+ <bpmn:sequenceFlow id="SequenceFlow_1pi168e" sourceRef="Task_00chyig" targetRef="ExclusiveGateway_0798yby" />
+ <bpmn:callActivity id="Task_1iuumxi" name="Call Assign RSRC SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1yltkyg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hcmrh9</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="Task_00chyig" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="DELNWKIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELNWKIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="DELNWKIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1wy1aba</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1pi168e</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1ucaagl" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" />
+ <bpmn:subProcess id="SubProcess_02vfqr7" triggeredByEvent="true">
+ <bpmn:endEvent id="EndEvent_0m7hpuj">
+ <bpmn:incoming>SequenceFlow_1s5yjuu</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0yr3vca" name="Catch Exception" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_01hh1wq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s5yjuu</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("workflowException", execution.getVariable("WorkflowException")]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_001ol7f">
+ <bpmn:outgoing>SequenceFlow_01hh1wq</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1s5yjuu" sourceRef="ScriptTask_0yr3vca" targetRef="EndEvent_0m7hpuj" />
+ <bpmn:sequenceFlow id="SequenceFlow_01hh1wq" sourceRef="StartEvent_001ol7f" targetRef="ScriptTask_0yr3vca" />
+ </bpmn:subProcess>
+ <bpmn:boundaryEvent id="BoundaryEvent_1mrkh9x" attachedToRef="CallActivity_1x88fsq">
+ <bpmn:outgoing>SequenceFlow_0b0m3o7</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_16cracu" attachedToRef="ServiceTask_1vx8ti9">
+ <bpmn:outgoing>SequenceFlow_141226w</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_141226w" sourceRef="BoundaryEvent_16cracu" targetRef="EndEvent_00y9o8y" />
+ <bpmn:sequenceFlow id="SequenceFlow_0b0m3o7" sourceRef="BoundaryEvent_1mrkh9x" targetRef="EndEvent_00y9o8y" />
+ <bpmn:endEvent id="EndEvent_00y9o8y">
+ <bpmn:incoming>SequenceFlow_141226w</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0b0m3o7</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1gk4tem" attachedToRef="Task_1iuumxi">
+ <bpmn:outgoing>SequenceFlow_1lr1613</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:boundaryEvent id="BoundaryEvent_1qaz277" attachedToRef="Task_00chyig">
+ <bpmn:outgoing>SequenceFlow_0np0b8p</bpmn:outgoing>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:boundaryEvent>
+ <bpmn:endEvent id="EndEvent_1qfbudr">
+ <bpmn:incoming>SequenceFlow_1lr1613</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0np0b8p</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_2" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1lr1613" sourceRef="BoundaryEvent_1gk4tem" targetRef="EndEvent_1qfbudr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0np0b8p" sourceRef="BoundaryEvent_1qaz277" targetRef="EndEvent_1qfbudr" />
+ <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackDeactivateSDNCRequest
+-rollbackNetworkRequest 
+WorkflowException
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" />
+ <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for:
+WorkflowException
+rolledBack
+wasDeleted
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" />
+ </bpmn:process>
+ <bpmn:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteNetworkInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="214" y="240" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1">
+ <dc:Bounds x="333" y="218" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg">
+ <di:waypoint xsi:type="dc:Point" x="250" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="333" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="292" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2">
+ <di:waypoint xsi:type="dc:Point" x="433" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="347" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="243" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1x88fsq_di" bpmnElement="CallActivity_1x88fsq">
+ <dc:Bounds x="506" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0p5zgdb_di" bpmnElement="ExclusiveGateway_0p5zgdb" isMarkerVisible="true">
+ <dc:Bounds x="531" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="360" width="55" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15">
+ <dc:Bounds x="112" y="355" width="277" height="115" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal">
+ <di:waypoint xsi:type="dc:Point" x="349" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="355" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu">
+ <dc:Bounds x="1097" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82">
+ <dc:Bounds x="1230" y="448" width="165" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b">
+ <di:waypoint xsi:type="dc:Point" x="1195" y="404" />
+ <di:waypoint xsi:type="dc:Point" x="1264" y="448" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bb7zpp_di" bpmnElement="SequenceFlow_1bb7zpp">
+ <di:waypoint xsi:type="dc:Point" x="581" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="589" y="350.17259171746633" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mxbdps_di" bpmnElement="SequenceFlow_1mxbdps">
+ <di:waypoint xsi:type="dc:Point" x="556" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="556" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="397.10731155015196" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07s5r14_di" bpmnElement="SequenceFlow_07s5r14">
+ <di:waypoint xsi:type="dc:Point" x="606" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad">
+ <dc:Bounds x="1253" y="252" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="288" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eyt8z2_di" bpmnElement="SequenceFlow_1eyt8z2">
+ <di:waypoint xsi:type="dc:Point" x="786" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="815" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="815" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="830" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="-6" y="665" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="142" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="27" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="45" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="303" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="321" y="783" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="63" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="142" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="105" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="242" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="277" y="760" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_04myanb_di" bpmnElement="ExclusiveGateway_0798yby">
+ <dc:Bounds x="1122" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1147" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xs882r_di" bpmnElement="SequenceFlow_1xs882r">
+ <di:waypoint xsi:type="dc:Point" x="1147" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1162" y="454" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03d5sol_di" bpmnElement="ExclusiveGateway_03d5sol" isMarkerVisible="true">
+ <dc:Bounds x="711" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="312" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yj3542_di" bpmnElement="SequenceFlow_1yj3542">
+ <di:waypoint xsi:type="dc:Point" x="761" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="774" y="354" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1vx8ti9_di" bpmnElement="ServiceTask_1vx8ti9">
+ <dc:Bounds x="686" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18e00sw_di" bpmnElement="SequenceFlow_18e00sw">
+ <di:waypoint xsi:type="dc:Point" x="736" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="736" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="748" y="394" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03fn5ks_di" bpmnElement="ExclusiveGateway_03fn5ks" isMarkerVisible="true">
+ <dc:Bounds x="866" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="867" y="310" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ga27si_di" bpmnElement="ExclusiveGateway_1ga27si" isMarkerVisible="true">
+ <dc:Bounds x="866" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="456" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xokvq6_di" bpmnElement="SequenceFlow_1xokvq6">
+ <di:waypoint xsi:type="dc:Point" x="916" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1097" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="353" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_172safw_di" bpmnElement="SequenceFlow_172safw">
+ <di:waypoint xsi:type="dc:Point" x="891" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="496" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="396.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wy1aba_di" bpmnElement="SequenceFlow_1wy1aba">
+ <di:waypoint xsi:type="dc:Point" x="891" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="677" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="541.5" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yltkyg_di" bpmnElement="SequenceFlow_1yltkyg">
+ <di:waypoint xsi:type="dc:Point" x="916" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="915" y="502" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hcmrh9_di" bpmnElement="SequenceFlow_1hcmrh9">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1122" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1089" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pi168e_di" bpmnElement="SequenceFlow_1pi168e">
+ <di:waypoint xsi:type="dc:Point" x="1055" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="677" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1101" y="662" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_12rk9t5_di" bpmnElement="Task_1iuumxi">
+ <dc:Bounds x="955" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0l1dvlv_di" bpmnElement="Task_00chyig">
+ <dc:Bounds x="955" y="637" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ucaagl_di" bpmnElement="SequenceFlow_1ucaagl">
+ <di:waypoint xsi:type="dc:Point" x="1147" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="1147" y="270" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="270" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1162" y="301" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_02vfqr7_di" bpmnElement="SubProcess_02vfqr7" isExpanded="true">
+ <dc:Bounds x="-10" y="898" width="382" height="213" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0m7hpuj_di" bpmnElement="EndEvent_0m7hpuj">
+ <dc:Bounds x="293" y="977" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="311" y="1013" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yr3vca_di" bpmnElement="ScriptTask_0yr3vca">
+ <dc:Bounds x="120" y="955" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_001ol7f_di" bpmnElement="StartEvent_001ol7f">
+ <dc:Bounds x="20" y="977" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="38" y="1013" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s5yjuu_di" bpmnElement="SequenceFlow_1s5yjuu">
+ <di:waypoint xsi:type="dc:Point" x="220" y="995" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="995" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="257" y="970" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01hh1wq_di" bpmnElement="SequenceFlow_01hh1wq">
+ <di:waypoint xsi:type="dc:Point" x="56" y="995" />
+ <di:waypoint xsi:type="dc:Point" x="120" y="995" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="980" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_10qmjw0_di" bpmnElement="BoundaryEvent_1mrkh9x">
+ <dc:Bounds x="588" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_1n1s1n0_di" bpmnElement="BoundaryEvent_16cracu">
+ <dc:Bounds x="668" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="686" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_141226w_di" bpmnElement="SequenceFlow_141226w">
+ <di:waypoint xsi:type="dc:Point" x="677" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="655" y="613" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b0m3o7_di" bpmnElement="SequenceFlow_0b0m3o7">
+ <di:waypoint xsi:type="dc:Point" x="615" y="576" />
+ <di:waypoint xsi:type="dc:Point" x="637" y="614" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="580" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0yeci14_di" bpmnElement="EndEvent_00y9o8y">
+ <dc:Bounds x="628" y="611" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646" y="647" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_10psbey_di" bpmnElement="BoundaryEvent_1gk4tem">
+ <dc:Bounds x="1037" y="543" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1055" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="BoundaryEvent_0wka4xd_di" bpmnElement="BoundaryEvent_1qaz277">
+ <dc:Bounds x="1037" y="619" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1055" y="655" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0c33uj0_di" bpmnElement="EndEvent_1qfbudr">
+ <dc:Bounds x="1089" y="587" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1107" y="623" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lr1613_di" bpmnElement="SequenceFlow_1lr1613">
+ <di:waypoint xsi:type="dc:Point" x="1068" y="572" />
+ <di:waypoint xsi:type="dc:Point" x="1094" y="594" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0np0b8p_di" bpmnElement="SequenceFlow_0np0b8p">
+ <di:waypoint xsi:type="dc:Point" x="1070" y="628" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="614" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1081" y="606" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn
new file mode 100644
index 0000000000..7fbfe46cdb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn
@@ -0,0 +1,486 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoDeleteResources" name="All Resources Deleted" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1uqzt26">
+ <bpmn:incoming>SequenceFlow_1r5306k</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:subProcess id="SubProcess_1u8zt9i" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0sf5lpt">
+ <bpmn:outgoing>SequenceFlow_1921mo3</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_06utmg4">
+ <bpmn:incoming>SequenceFlow_18vlzfo</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0nha3pr" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1921mo3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18vlzfo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1921mo3" name="" sourceRef="StartEvent_0sf5lpt" targetRef="ScriptTask_0nha3pr" />
+ <bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" />
+ </bpmn:subProcess>
+ <bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_14bl5a0" />
+ <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For WAN" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ubor5z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1dza4q4</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = execution.getVariable("resourceType")
+def ddsi = new DoDeleteResources()
+ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1dza4q4" sourceRef="ScriptTask_0z30dax" targetRef="CallActivity_Del_SDNC_cust" />
+ <bpmn:sequenceFlow id="SequenceFlow_1wnkgpx" sourceRef="Task_0z1x3sg" targetRef="Task_0963dho" />
+ <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For NS" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1x3lehs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wnkgpx</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String resourceName = execution.getVariable("resourceType")
+def ddsi = new DoDeleteResources()
+ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for NS" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1wnkgpx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0phwem2</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:serviceTask id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC Overlay" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1dza4q4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lxqjmp</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0edkv0m" name="Call Delete SDNC Service Topology" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1icwpye</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yujjwx</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="ScriptTask_0o5bglz" name="Sequense Resources" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xqdf1z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_03c0zlq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.sequenceResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource" default="SequenceFlow_1x3lehs">
+ <bpmn:incoming>SequenceFlow_1htjmkv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ubor5z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1x3lehs</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_12q6a51" name="Get Current Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_03c0zlq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0s1lswk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1htjmkv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.getCurrentResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_03c0zlq" sourceRef="ScriptTask_0o5bglz" targetRef="ScriptTask_12q6a51" />
+ <bpmn:sequenceFlow id="SequenceFlow_1htjmkv" sourceRef="ScriptTask_12q6a51" targetRef="ExclusiveGateway_07toixi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ubor5z" name="SDN-C" sourceRef="ExclusiveGateway_07toixi" targetRef="ScriptTask_0z30dax">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "SDN-C" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg" />
+ <bpmn:scriptTask id="ScriptTask_0w46sge" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1lxqjmp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0phwem2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0l5r96s</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.parseNextResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1lxqjmp" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_0w46sge" />
+ <bpmn:sequenceFlow id="SequenceFlow_0phwem2" sourceRef="Task_0963dho" targetRef="ScriptTask_0w46sge" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted" default="SequenceFlow_0s1lswk">
+ <bpmn:incoming>SequenceFlow_0l5r96s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0talboa</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0s1lswk</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0l5r96s" sourceRef="ScriptTask_0w46sge" targetRef="ExclusiveGateway_1hgjg3u" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained" default="SequenceFlow_12avhgx">
+ <bpmn:incoming>SequenceFlow_0talboa</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1icwpye</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_12avhgx</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1icwpye" name="yes" sourceRef="ExclusiveGateway_16046vb" targetRef="Task_0edkv0m">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0talboa" name="yes" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ExclusiveGateway_16046vb">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yujjwx" sourceRef="Task_0edkv0m" targetRef="ScriptTask_14pmqni" />
+ <bpmn:scriptTask id="ScriptTask_14pmqni" name="Post Config Service Instance Creation" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1yujjwx</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_12avhgx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1r5306k</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoCreateResources()
+csi.postConfigRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1r5306k" sourceRef="ScriptTask_14pmqni" targetRef="EndEvent_1uqzt26" />
+ <bpmn:scriptTask id="ScriptTask_0ib77as" name="GET Current NS " scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_042d7oc</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1t2hfv0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1t8hf8m</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.getCurrentNS(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_0kf50as" name="GET NS Info from AAI" 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_1t8hf8m</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0p5gr4z</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="ScriptTask_1lqjyj9" name="Post Process GET NS Info from AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0p5gr4z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_131imj8</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.postProcessAAIGET(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1t8hf8m" sourceRef="ScriptTask_0ib77as" targetRef="CallActivity_0kf50as" />
+ <bpmn:sequenceFlow id="SequenceFlow_0p5gr4z" sourceRef="CallActivity_0kf50as" targetRef="ScriptTask_1lqjyj9" />
+ <bpmn:sequenceFlow id="SequenceFlow_1n85wxv" sourceRef="ScriptTask_197fr01" targetRef="ExclusiveGateway_1lt9ijz" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1lt9ijz" name="Is All Resource Info OK" default="SequenceFlow_042d7oc">
+ <bpmn:extensionElements>
+ <camunda:properties>
+ <camunda:property />
+ </camunda:properties>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1n85wxv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xqdf1z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_042d7oc</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0xqdf1z" sourceRef="ExclusiveGateway_1lt9ijz" targetRef="ScriptTask_0o5bglz">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allNsFinished" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_042d7oc" sourceRef="ExclusiveGateway_1lt9ijz" targetRef="ScriptTask_0ib77as" />
+ <bpmn:scriptTask id="ScriptTask_14bl5a0" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1t2hfv0</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1t2hfv0" sourceRef="ScriptTask_14bl5a0" targetRef="ScriptTask_0ib77as" />
+ <bpmn:scriptTask id="ScriptTask_197fr01" name="Parse Next NS" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_131imj8</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1n85wxv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteResources()
+ddsi.parseNextNS(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_131imj8" sourceRef="ScriptTask_1lqjyj9" targetRef="ScriptTask_197fr01" />
+ <bpmn:sequenceFlow id="SequenceFlow_12avhgx" name="no" sourceRef="ExclusiveGateway_16046vb" targetRef="ScriptTask_14pmqni" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResources">
+ <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r">
+ <dc:Bounds x="-214" y="-319" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-220" y="-278" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26">
+ <dc:Bounds x="1388" y="725" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1316" y="766" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true">
+ <dc:Bounds x="292" y="675" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9">
+ <di:waypoint xsi:type="dc:Point" x="-196" y="-283" />
+ <di:waypoint xsi:type="dc:Point" x="-196" y="-220" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-226" y="-257.5" 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>
+ <dc:Bounds x="288" y="783" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4">
+ <dc:Bounds x="653" y="742" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="581" y="783" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr">
+ <dc:Bounds x="464" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3">
+ <di:waypoint xsi:type="dc:Point" x="396" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="340" y="745" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo">
+ <di:waypoint xsi:type="dc:Point" x="564" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="653" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="520" y="745" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax">
+ <dc:Bounds x="470" y="111" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4">
+ <di:waypoint xsi:type="dc:Point" x="570" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="152" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="130.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx">
+ <di:waypoint xsi:type="dc:Point" x="576" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="378" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="587" y="357" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg">
+ <dc:Bounds x="476" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho">
+ <dc:Bounds x="688" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust">
+ <dc:Bounds x="688" y="112" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
+ <dc:Bounds x="1356" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0o5bglz_di" bpmnElement="ScriptTask_0o5bglz">
+ <dc:Bounds x="-26" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07toixi_di" bpmnElement="ExclusiveGateway_07toixi" isMarkerVisible="true">
+ <dc:Bounds x="342.56962025316454" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="404" y="261" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_12q6a51_di" bpmnElement="ScriptTask_12q6a51">
+ <dc:Bounds x="159" y="450" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_03c0zlq_di" bpmnElement="SequenceFlow_03c0zlq">
+ <di:waypoint xsi:type="dc:Point" x="24" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="494" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="397.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1htjmkv_di" bpmnElement="SequenceFlow_1htjmkv">
+ <di:waypoint xsi:type="dc:Point" x="209" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="343" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="355.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ubor5z_di" bpmnElement="SequenceFlow_1ubor5z">
+ <di:waypoint xsi:type="dc:Point" x="368" y="248" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="151" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="381" y="161" width="37" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x3lehs_di" bpmnElement="SequenceFlow_1x3lehs">
+ <di:waypoint xsi:type="dc:Point" x="368" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="378" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="353" width="28" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w46sge_di" bpmnElement="ScriptTask_0w46sge">
+ <dc:Bounds x="865" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lxqjmp_di" bpmnElement="SequenceFlow_1lxqjmp">
+ <di:waypoint xsi:type="dc:Point" x="788" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="206.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0phwem2_di" bpmnElement="SequenceFlow_0phwem2">
+ <di:waypoint xsi:type="dc:Point" x="788" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="842" y="319.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hgjg3u_di" bpmnElement="ExclusiveGateway_1hgjg3u" isMarkerVisible="true">
+ <dc:Bounds x="1040.9252217997464" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="215" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0l5r96s_di" bpmnElement="SequenceFlow_0l5r96s">
+ <di:waypoint xsi:type="dc:Point" x="965" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1041" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1003" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_16046vb_di" bpmnElement="ExclusiveGateway_16046vb" isMarkerVisible="true">
+ <dc:Bounds x="1203.8174904942966" y="248.28010139416983" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="214" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1icwpye_di" bpmnElement="SequenceFlow_1icwpye">
+ <di:waypoint xsi:type="dc:Point" x="1254" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1297" y="252" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0talboa_di" bpmnElement="SequenceFlow_0talboa">
+ <di:waypoint xsi:type="dc:Point" x="1091" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1204" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1138" y="252" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s1lswk_di" bpmnElement="SequenceFlow_0s1lswk">
+ <di:waypoint xsi:type="dc:Point" x="1066" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1066" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="259" y="490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1074" y="388" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yujjwx_di" bpmnElement="SequenceFlow_1yujjwx">
+ <di:waypoint xsi:type="dc:Point" x="1406" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="523" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1421" y="412" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14pmqni_di" bpmnElement="ScriptTask_14pmqni">
+ <dc:Bounds x="1356" y="523" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r5306k_di" bpmnElement="SequenceFlow_1r5306k">
+ <di:waypoint xsi:type="dc:Point" x="1406" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="725" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1421" y="658" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0ib77as_di" bpmnElement="ScriptTask_0ib77as">
+ <dc:Bounds x="-246" y="-84" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kf50as_di" bpmnElement="CallActivity_0kf50as">
+ <dc:Bounds x="-84" y="-84" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1lqjyj9_di" bpmnElement="ScriptTask_1lqjyj9">
+ <dc:Bounds x="80" y="-84" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t8hf8m_di" bpmnElement="SequenceFlow_1t8hf8m">
+ <di:waypoint xsi:type="dc:Point" x="-146" y="-44" />
+ <di:waypoint xsi:type="dc:Point" x="-84" y="-44" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-160" y="-65" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p5gr4z_di" bpmnElement="SequenceFlow_0p5gr4z">
+ <di:waypoint xsi:type="dc:Point" x="16" y="-44" />
+ <di:waypoint xsi:type="dc:Point" x="80" y="-44" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="3" y="-65" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n85wxv_di" bpmnElement="SequenceFlow_1n85wxv">
+ <di:waypoint xsi:type="dc:Point" x="290" y="-4" />
+ <di:waypoint xsi:type="dc:Point" x="290" y="106" />
+ <di:waypoint xsi:type="dc:Point" x="49" y="106" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="305" y="45" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1lt9ijz_di" bpmnElement="ExclusiveGateway_1lt9ijz" isMarkerVisible="true">
+ <dc:Bounds x="-1" y="81" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-13" y="135" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xqdf1z_di" bpmnElement="SequenceFlow_0xqdf1z">
+ <di:waypoint xsi:type="dc:Point" x="24" y="131" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="176" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_042d7oc_di" bpmnElement="SequenceFlow_042d7oc">
+ <di:waypoint xsi:type="dc:Point" x="-1" y="106" />
+ <di:waypoint xsi:type="dc:Point" x="-196" y="106" />
+ <di:waypoint xsi:type="dc:Point" x="-196" y="-4" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-98.5" y="85" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14bl5a0_di" bpmnElement="ScriptTask_14bl5a0">
+ <dc:Bounds x="-246" y="-220" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1t2hfv0_di" bpmnElement="SequenceFlow_1t2hfv0">
+ <di:waypoint xsi:type="dc:Point" x="-196" y="-140" />
+ <di:waypoint xsi:type="dc:Point" x="-196" y="-84" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-181" y="-118" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_197fr01_di" bpmnElement="ScriptTask_197fr01">
+ <dc:Bounds x="240" y="-84" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_131imj8_di" bpmnElement="SequenceFlow_131imj8">
+ <di:waypoint xsi:type="dc:Point" x="180" y="-44" />
+ <di:waypoint xsi:type="dc:Point" x="240" y="-44" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="210" y="-65" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12avhgx_di" bpmnElement="SequenceFlow_12avhgx">
+ <di:waypoint xsi:type="dc:Point" x="1229" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="563" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="563" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1237" y="425" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
new file mode 100644
index 0000000000..fe5e93cbec
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoDeleteResourcesV1" name="DoDeleteResourcesV1" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Start Resource Delete">
+ <bpmn:outgoing>SequenceFlow_0stqur4</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_0ngvt9d" name="Prepare Delete Resource Recipe" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1oil1t3</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_13nyd1j</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1qm7owo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddrs = new DoDeleteResourcesV1()
+ddrs.preResourceDelete(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_15zy0jf" name="Execute Delete Resource Recipe" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_098gain</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ly5jrs</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddr = new DoDeleteResourcesV1()
+ddr.executeResourceDelete(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1gf78zz" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ly5jrs</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0djplpd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0i1gez5</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddr = new DoDeleteResourcesV1()
+ddr.parseNextResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0rtr0n7" name="Is All Resource Deleted">
+ <bpmn:incoming>SequenceFlow_0i1gez5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oil1t3</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1d5mzit</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0stqur4" sourceRef="StartEvent_1" targetRef="Task_1ue68b0" />
+ <bpmn:sequenceFlow id="SequenceFlow_1qm7owo" sourceRef="ScriptTask_0ngvt9d" targetRef="ExclusiveGateway_0khn1my" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ly5jrs" sourceRef="ScriptTask_15zy0jf" targetRef="ScriptTask_1gf78zz" />
+ <bpmn:sequenceFlow id="SequenceFlow_0i1gez5" sourceRef="ScriptTask_1gf78zz" targetRef="ExclusiveGateway_0rtr0n7" />
+ <bpmn:sequenceFlow id="SequenceFlow_1oil1t3" name="No" sourceRef="ExclusiveGateway_0rtr0n7" targetRef="ScriptTask_0ngvt9d">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:subProcess id="SubProcess_0sbt4ns" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1cjikl5">
+ <bpmn:outgoing>SequenceFlow_0rkycoj</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0gh3mcj">
+ <bpmn:incoming>SequenceFlow_117fiux</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0plexin" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rkycoj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_117fiux</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0rkycoj" name="" sourceRef="StartEvent_1cjikl5" targetRef="ScriptTask_0plexin" />
+ <bpmn:sequenceFlow id="SequenceFlow_117fiux" name="" sourceRef="ScriptTask_0plexin" targetRef="EndEvent_0gh3mcj" />
+ </bpmn:subProcess>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1x63i6w" name="Is SDNC Service Contained">
+ <bpmn:incoming>SequenceFlow_1yrkxjm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s1nnmj</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0lk19rm</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1yrkxjm" sourceRef="StartEvent_1eo3c2a" targetRef="ExclusiveGateway_1x63i6w" />
+ <bpmn:endEvent id="EndEvent_17bzayo" name="End Resource Deletion">
+ <bpmn:incoming>SequenceFlow_0o21fg8</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1s1nnmj" name="yes" sourceRef="ExclusiveGateway_1x63i6w" targetRef="prepareSDNCServiceTopologyDelete">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0lk19rm" name="no" sourceRef="ExclusiveGateway_1x63i6w" targetRef="ExclusiveGateway_1jybr0n">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1d5mzit" sourceRef="ExclusiveGateway_0rtr0n7" targetRef="EndEvent_17h3h92" />
+ <bpmn:intermediateThrowEvent id="EndEvent_17h3h92" name="Go To Delete SDNC Service Topology">
+ <bpmn:incoming>SequenceFlow_1d5mzit</bpmn:incoming>
+ <bpmn:linkEventDefinition name="DeleteSDNCServiceTopology" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:intermediateCatchEvent id="StartEvent_1eo3c2a" name="Delete SDNC Service Topology">
+ <bpmn:outgoing>SequenceFlow_1yrkxjm</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="DeleteSDNCServiceTopology" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1jybr0n">
+ <bpmn:incoming>SequenceFlow_0lk19rm</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_14fx6hv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0o21fg8</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0o21fg8" sourceRef="ExclusiveGateway_1jybr0n" targetRef="EndEvent_17bzayo" />
+ <bpmn:scriptTask id="ScriptTask_12460xo" name="Sequense Resources" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_14dezx8</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13nyd1j</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddrs = new DoDeleteResourcesV1()
+ddrs.sequenceResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_13nyd1j" sourceRef="ScriptTask_12460xo" targetRef="ScriptTask_0ngvt9d" />
+ <bpmn:sequenceFlow id="SequenceFlow_14dezx8" sourceRef="Task_1ue68b0" targetRef="ScriptTask_12460xo" />
+ <bpmn:scriptTask id="Task_1ue68b0" name="Preprocess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0stqur4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14dezx8</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddrs = new DoDeleteResourcesV1()
+ddrs.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0khn1my" name="Is The Resource Instance Exists">
+ <bpmn:incoming>SequenceFlow_1qm7owo</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_098gain</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_19ccmqv</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_098gain" name="yes" sourceRef="ExclusiveGateway_0khn1my" targetRef="ScriptTask_15zy0jf">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("resourceInstanceId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:serviceTask id="ServiceTask_1bw1mjh" name="update 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_11bgbsh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0djplpd</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="ScriptTask_0shhhxr" name="Prepare progress finished for the resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_19ccmqv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11bgbsh</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteResourcesV1()
+dcsi.prepareFinishedProgressForResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_11bgbsh" sourceRef="ScriptTask_0shhhxr" targetRef="ServiceTask_1bw1mjh" />
+ <bpmn:sequenceFlow id="SequenceFlow_19ccmqv" name="no" sourceRef="ExclusiveGateway_0khn1my" targetRef="ScriptTask_0shhhxr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0djplpd" sourceRef="ServiceTask_1bw1mjh" targetRef="ScriptTask_1gf78zz" />
+ <bpmn:sequenceFlow id="SequenceFlow_11h5pba" sourceRef="prepareSDNCServiceTopologyDelete" targetRef="CallActivity_1ueonyc" />
+ <bpmn:scriptTask id="prepareSDNCServiceTopologyDelete" name="Prepare SDNC service Topology Deactivate" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1s1nnmj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11h5pba</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddr = new DoDeleteResourcesV1()
+ddr.prepareSDNCServiceDeactivateRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="CallActivity_1ueonyc" name="Call SDNC RSRC &#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="DELSDNCRES_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELSDNCRES_sdncDeleteReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="DELSDNCRES_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_11h5pba</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0gqlayv</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0gqlayv" sourceRef="CallActivity_1ueonyc" targetRef="ScriptTask_0k6kwv7" />
+ <bpmn:callActivity id="CallActivity_0zuhttc" name="Call SDNC RSRC &#10; Adapter V1&#10;" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="sdncAdapterResponse" target="DELSDNCRES_activateSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="DELSDNCRES_sdncDeleteReturnCode" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="DELSDNCRES_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0etaubw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_14fx6hv</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_14fx6hv" sourceRef="CallActivity_0zuhttc" targetRef="ExclusiveGateway_1jybr0n" />
+ <bpmn:scriptTask id="ScriptTask_0k6kwv7" name="Prepare SDNC service Topology Delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0gqlayv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0etaubw</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddr = new DoDeleteResourcesV1()
+ddr.prepareSDNCServiceDeleteRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0etaubw" sourceRef="ScriptTask_0k6kwv7" targetRef="CallActivity_0zuhttc" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResourcesV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-70" y="255" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-89" y="291" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ngvt9d_di" bpmnElement="ScriptTask_0ngvt9d">
+ <dc:Bounds x="392" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15zy0jf_di" bpmnElement="ScriptTask_15zy0jf">
+ <dc:Bounds x="665" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1gf78zz_di" bpmnElement="ScriptTask_1gf78zz">
+ <dc:Bounds x="865" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0rtr0n7_di" bpmnElement="ExclusiveGateway_0rtr0n7" isMarkerVisible="true">
+ <dc:Bounds x="1011" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="999" y="302" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0stqur4_di" bpmnElement="SequenceFlow_0stqur4">
+ <di:waypoint xsi:type="dc:Point" x="-34" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="38" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm7owo_di" bpmnElement="SequenceFlow_1qm7owo">
+ <di:waypoint xsi:type="dc:Point" x="492" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="550" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="476" y="252" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ly5jrs_di" bpmnElement="SequenceFlow_1ly5jrs">
+ <di:waypoint xsi:type="dc:Point" x="765" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="252" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0i1gez5_di" bpmnElement="SequenceFlow_0i1gez5">
+ <di:waypoint xsi:type="dc:Point" x="965" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1011" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="943" y="252" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oil1t3_di" bpmnElement="SequenceFlow_1oil1t3">
+ <di:waypoint xsi:type="dc:Point" x="1036" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1036" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="313" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="731" y="397" width="16" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0sbt4ns_di" bpmnElement="SubProcess_0sbt4ns" isExpanded="true">
+ <dc:Bounds x="453" y="815" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1cjikl5_di" bpmnElement="StartEvent_1cjikl5">
+ <dc:Bounds x="523" y="884" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="925" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0gh3mcj_di" bpmnElement="EndEvent_0gh3mcj">
+ <dc:Bounds x="816" y="884" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="925" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0plexin_di" bpmnElement="ScriptTask_0plexin">
+ <dc:Bounds x="627" y="862" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rkycoj_di" bpmnElement="SequenceFlow_0rkycoj">
+ <di:waypoint xsi:type="dc:Point" x="559" y="902" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="902" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="458" y="887" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_117fiux_di" bpmnElement="SequenceFlow_117fiux">
+ <di:waypoint xsi:type="dc:Point" x="727" y="902" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="902" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639.5" y="887" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x63i6w_di" bpmnElement="ExclusiveGateway_1x63i6w" isMarkerVisible="true">
+ <dc:Bounds x="396" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="379" y="635" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yrkxjm_di" bpmnElement="SequenceFlow_1yrkxjm">
+ <di:waypoint xsi:type="dc:Point" x="269" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="396" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="332.5" y="585" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_17bzayo_di" bpmnElement="EndEvent_17bzayo">
+ <dc:Bounds x="1194" y="588" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1181" y="628" width="68" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s1nnmj_di" bpmnElement="SequenceFlow_1s1nnmj">
+ <di:waypoint xsi:type="dc:Point" x="446" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="509" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="468.8987341772152" y="585" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lk19rm_di" bpmnElement="SequenceFlow_0lk19rm">
+ <di:waypoint xsi:type="dc:Point" x="421" y="631" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="1130" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="1130" y="631" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770.322505800464" y="700" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1d5mzit_di" bpmnElement="SequenceFlow_1d5mzit">
+ <di:waypoint xsi:type="dc:Point" x="1061" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1150" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1105.5" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_122grb2_di" bpmnElement="EndEvent_17h3h92">
+ <dc:Bounds x="1150" y="255" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="295" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_11q62m0_di" bpmnElement="StartEvent_1eo3c2a">
+ <dc:Bounds x="233" y="588" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="628" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1jybr0n_di" bpmnElement="ExclusiveGateway_1jybr0n" isMarkerVisible="true">
+ <dc:Bounds x="1105" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1086" y="635" width="90" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o21fg8_di" bpmnElement="SequenceFlow_0o21fg8">
+ <di:waypoint xsi:type="dc:Point" x="1155" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1194" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1129.5" y="585" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_12460xo_di" bpmnElement="ScriptTask_12460xo">
+ <dc:Bounds x="219" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13nyd1j_di" bpmnElement="SequenceFlow_13nyd1j">
+ <di:waypoint xsi:type="dc:Point" x="319" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="355.5" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14dezx8_di" bpmnElement="SequenceFlow_14dezx8">
+ <di:waypoint xsi:type="dc:Point" x="138" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="219" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="178.5" y="252" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1tdnal8_di" bpmnElement="Task_1ue68b0">
+ <dc:Bounds x="38" y="233" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0khn1my_di" bpmnElement="ExclusiveGateway_0khn1my" isMarkerVisible="true">
+ <dc:Bounds x="550" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="301" width="79" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_098gain_di" bpmnElement="SequenceFlow_098gain">
+ <di:waypoint xsi:type="dc:Point" x="600" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="273" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="624" y="251" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1bw1mjh_di" bpmnElement="ServiceTask_1bw1mjh">
+ <dc:Bounds x="865" y="112" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0shhhxr_di" bpmnElement="ScriptTask_0shhhxr">
+ <dc:Bounds x="665" y="112" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11bgbsh_di" bpmnElement="SequenceFlow_11bgbsh">
+ <di:waypoint xsi:type="dc:Point" x="765" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="152" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="815" y="130" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ccmqv_di" bpmnElement="SequenceFlow_19ccmqv">
+ <di:waypoint xsi:type="dc:Point" x="575" y="248" />
+ <di:waypoint xsi:type="dc:Point" x="575" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="152" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="193" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0djplpd_di" bpmnElement="SequenceFlow_0djplpd">
+ <di:waypoint xsi:type="dc:Point" x="915" y="192" />
+ <di:waypoint xsi:type="dc:Point" x="915" y="213" />
+ <di:waypoint xsi:type="dc:Point" x="915" y="213" />
+ <di:waypoint xsi:type="dc:Point" x="915" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="930" y="206" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11h5pba_di" bpmnElement="SequenceFlow_11h5pba">
+ <di:waypoint xsi:type="dc:Point" x="609" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="654" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="586.5" y="585" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0va5zgp_di" bpmnElement="prepareSDNCServiceTopologyDelete">
+ <dc:Bounds x="509" y="566" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ueonyc_di" bpmnElement="CallActivity_1ueonyc">
+ <dc:Bounds x="654" y="566" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gqlayv_di" bpmnElement="SequenceFlow_0gqlayv">
+ <di:waypoint xsi:type="dc:Point" x="754" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="789" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="771.5" y="584" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zuhttc_di" bpmnElement="CallActivity_0zuhttc">
+ <dc:Bounds x="936" y="566" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14fx6hv_di" bpmnElement="SequenceFlow_14fx6hv">
+ <di:waypoint xsi:type="dc:Point" x="1036" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1105" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1070.5" y="584" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0k6kwv7_di" bpmnElement="ScriptTask_0k6kwv7">
+ <dc:Bounds x="789" y="566" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0etaubw_di" bpmnElement="SequenceFlow_0etaubw">
+ <di:waypoint xsi:type="dc:Point" x="889" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="912.5" y="584" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</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
new file mode 100644
index 0000000000..fae66a7381
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteServiceInstance" name="DoDeleteServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="deleteSI_startEven" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_0jfgn05</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0jfgn05</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jqc16k</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1wyvxwi</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" name="Call SDNC Service Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDeactivate" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeactivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0yohjl7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Deactivate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w8ao21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("sdncDeactivateResponse")
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessSDNCDelete(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jfgn05" sourceRef="deleteSI_startEven" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="ScriptTask_0xxwbdq" name="PreProcess SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dwch0k</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ju26o1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.preProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0590oev" name="SI found in AAI" default="SequenceFlow_05jfuko">
+ <bpmn2:incoming>SequenceFlow_1up0j5r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1hcfvcj</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_05jfuko</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hcfvcj" name="yes" sourceRef="ExclusiveGateway_0590oev" targetRef="ExclusiveGateway_1mrh7us">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:endEvent id="EndEvent_0ronxsz">
+ <bpmn2:incoming>SequenceFlow_05jfuko</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_05jfuko" name="no" sourceRef="ExclusiveGateway_0590oev" targetRef="EndEvent_0ronxsz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1w8ao21" sourceRef="ScriptTask_1uxr0cx" targetRef="CallActivity_1c5wru8" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1mrh7us" name="need to invoke SDNC" default="SequenceFlow_1dwch0k">
+ <bpmn2:incoming>SequenceFlow_1hcfvcj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0riudmc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1dwch0k</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0riudmc" name="no" sourceRef="ExclusiveGateway_1mrh7us" targetRef="ScriptTask_1ybdq3e">
+ <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: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>
+ </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>
+ <bpmn2:incoming>SequenceFlow_0znbzxu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wyvxwi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.deleteServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wyvxwi" sourceRef="ScriptTask_1ybdq3e" targetRef="EndEvent_3" />
+ <bpmn2:subProcess id="SubProcess_1jggn82" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1antv0y">
+ <bpmn2:outgoing>SequenceFlow_0u33vy6</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_03iywf6">
+ <bpmn2:incoming>SequenceFlow_0hevfee</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1va95un" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0u33vy6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0hevfee</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0u33vy6" name="" sourceRef="StartEvent_1antv0y" targetRef="ScriptTask_1va95un" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0hevfee" name="" sourceRef="ScriptTask_1va95un" targetRef="EndEvent_03iywf6" />
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="CallActivity_1c5wru8" name="Call SDNC Service Topology Delete" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncDelete" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
+ <camunda:in source="serviceInstanceId" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="sdncDeleteResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1w8ao21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1swzrij</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14x55db</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0lc115e" name="Post Process SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14x55db</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0znbzxu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+
+String response = execution.getVariable("sdncDeleteResponse")
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14x55db" sourceRef="CallActivity_1c5wru8" targetRef="ScriptTask_0lc115e" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0znbzxu" sourceRef="ScriptTask_0lc115e" targetRef="ScriptTask_1ybdq3e" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1xbefi3" name="skipDeactivate for TRANSPORT" default="SequenceFlow_0yohjl7">
+ <bpmn2:incoming>SequenceFlow_1ju26o1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0yohjl7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1swzrij</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ju26o1" sourceRef="ScriptTask_0xxwbdq" targetRef="ExclusiveGateway_1xbefi3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0yohjl7" name="no" sourceRef="ExclusiveGateway_1xbefi3" targetRef="CallActivity_0ak0ezb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1swzrij" name="yes" sourceRef="ExclusiveGateway_1xbefi3" targetRef="CallActivity_1c5wru8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("skipDeactivate" ) == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteSI_startEven">
+ <dc:Bounds x="-334" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-340" y="120" width="49" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="-265" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1277" y="201" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1250" y="242" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="713" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="745" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="613" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="776" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jfgn05_di" bpmnElement="SequenceFlow_0jfgn05">
+ <di:waypoint xsi:type="dc:Point" x="-298" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-265" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-281" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0xxwbdq_di" bpmnElement="ScriptTask_0xxwbdq">
+ <dc:Bounds x="354" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0590oev_di" bpmnElement="ExclusiveGateway_0590oev" isMarkerVisible="true">
+ <dc:Bounds x="150" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="138" y="51" width="74" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hcfvcj_di" bpmnElement="SequenceFlow_1hcfvcj">
+ <di:waypoint xsi:type="dc:Point" x="200" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="236" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="99" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0ronxsz_di" bpmnElement="EndEvent_0ronxsz">
+ <dc:Bounds x="157" y="221" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="175" y="262" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05jfuko_di" bpmnElement="SequenceFlow_05jfuko">
+ <di:waypoint xsi:type="dc:Point" x="175" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="175" y="221" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="156" y="137.69226916562667" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w8ao21_di" bpmnElement="SequenceFlow_1w8ao21">
+ <di:waypoint xsi:type="dc:Point" x="876" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="917" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mrh7us_di" bpmnElement="ExclusiveGateway_1mrh7us" isMarkerVisible="true">
+ <dc:Bounds x="236" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="228" y="126" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0riudmc_di" bpmnElement="SequenceFlow_0riudmc">
+ <di:waypoint xsi:type="dc:Point" x="261" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="261" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1295" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1295" y="57" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777.7386478304746" y="-35.00000000000001" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dwch0k_di" bpmnElement="SequenceFlow_1dwch0k">
+ <di:waypoint xsi:type="dc:Point" x="286" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="310" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="353" y="97" />
+ <bpmndi:BPMNLabel>
+ <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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-143" y="82" width="0" 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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="135" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ybdq3e_di" bpmnElement="ScriptTask_1ybdq3e">
+ <dc:Bounds x="1245" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wyvxwi_di" bpmnElement="SequenceFlow_1wyvxwi">
+ <di:waypoint xsi:type="dc:Point" x="1295" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1295" y="201" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1265" y="169" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1jggn82_di" bpmnElement="SubProcess_1jggn82" isExpanded="true">
+ <dc:Bounds x="266" y="409" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1antv0y_di" bpmnElement="StartEvent_1antv0y">
+ <dc:Bounds x="334" y="475" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="352" y="516" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_03iywf6_di" bpmnElement="EndEvent_03iywf6">
+ <dc:Bounds x="627" y="475" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645" y="516" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1va95un_di" bpmnElement="ScriptTask_1va95un">
+ <dc:Bounds x="438" y="453" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u33vy6_di" bpmnElement="SequenceFlow_0u33vy6">
+ <di:waypoint xsi:type="dc:Point" x="370" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="438" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="404" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hevfee_di" bpmnElement="SequenceFlow_0hevfee">
+ <di:waypoint xsi:type="dc:Point" x="538" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="627" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="583" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1c5wru8_di" bpmnElement="CallActivity_1c5wru8">
+ <dc:Bounds x="917" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0lc115e_di" bpmnElement="ScriptTask_0lc115e">
+ <dc:Bounds x="1058" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14x55db_di" bpmnElement="SequenceFlow_14x55db">
+ <di:waypoint xsi:type="dc:Point" x="1017" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1038" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0znbzxu_di" bpmnElement="SequenceFlow_0znbzxu">
+ <di:waypoint xsi:type="dc:Point" x="1158" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1245" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1156.5" y="82" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1xbefi3_di" bpmnElement="ExclusiveGateway_1xbefi3" isMarkerVisible="true">
+ <dc:Bounds x="508" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="495" y="126" width="84" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ju26o1_di" bpmnElement="SequenceFlow_1ju26o1">
+ <di:waypoint xsi:type="dc:Point" x="454" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="481" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yohjl7_di" bpmnElement="SequenceFlow_0yohjl7">
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="613" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="580" y="72" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1swzrij_di" bpmnElement="SequenceFlow_1swzrij">
+ <di:waypoint xsi:type="dc:Point" x="533" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="533" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="57" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="741" y="11" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn
new file mode 100644
index 0000000000..e6ad16b4d1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn
@@ -0,0 +1,275 @@
+<?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.11.3">
+ <bpmn:process id="DoDeleteVFCNetworkServiceInstance" name="DoDeleteVFCNetworkServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="deleteNS_StartEvent" name="deleteNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNS_StartEvent" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:scriptTask id="Task_09nzhwk" name="Delete Network Service" scriptFormat="groovy">
+ <bpmn:incoming>terminateFinished_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sjop71</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.deleteNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_150q0fo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="terminate_NSTask" name="terminate Network Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1h1c24p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ywe21t</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.terminateNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0zfksms" name="Delete NS Success?">
+ <bpmn:incoming>SequenceFlow_1sjop71</bpmn:incoming>
+ <bpmn:outgoing>deleteNSFailed_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>deleteNSSuccess_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="deleteNSFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_0zfksms" targetRef="deleteNSFailed_EndEvent">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) != "finished")}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1is7zys" name="terminate NS Success?">
+ <bpmn:incoming>SequenceFlow_1ywe21t</bpmn:incoming>
+ <bpmn:outgoing>terminateFailed_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>terminateSuccess_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1ywe21t" sourceRef="terminate_NSTask" targetRef="ExclusiveGateway_1is7zys" />
+ <bpmn:sequenceFlow id="terminateFailed_SequenceFlow" name="no" sourceRef="ExclusiveGateway_1is7zys" targetRef="EndEvent_1gkvvpn">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) == null || execution.getVariable("jobId" ) == "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="terminateSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_1is7zys" targetRef="queryJob_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("jobId" ) != null && execution.getVariable("jobId" ) != "" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_15492gl" name="terminate Finished?">
+ <bpmn:incoming>SequenceFlow_0xqo13p</bpmn:incoming>
+ <bpmn:outgoing>terminateFinished_SequenceFlow</bpmn:outgoing>
+ <bpmn:outgoing>terminateProcessing_SequenceFlow</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="terminateFinished_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_15492gl" targetRef="Task_09nzhwk">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationProgress" ) == "100" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="terminateProcessing_SequenceFlow" name="no" sourceRef="ExclusiveGateway_15492gl" targetRef="timeDelay_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationProgress" ) != "100" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0cq2q6g" sourceRef="finishNSDelete_Task" targetRef="EndEvent_1x6k78c" />
+ <bpmn:endEvent id="deleteNSFailed_EndEvent" name="deleteNSFailed">
+ <bpmn:incoming>deleteNSFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1gkvvpn">
+ <bpmn:incoming>terminateFailed_SequenceFlow</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_1x6k78c">
+ <bpmn:incoming>SequenceFlow_0cq2q6g</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="queryJob_Task" name="Query NS Progress" scriptFormat="groovy">
+ <bpmn:incoming>terminateSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1gsbpxj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xqo13p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.queryNSProgress(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="finishNSDelete_Task" name="Finish NS Delete">
+ <bpmn:incoming>deleteNSSuccess_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0cq2q6g</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoCreateVFCNetworkServiceInstance()
+dcsi.finishNSDelete(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0xqo13p" sourceRef="queryJob_Task" targetRef="ExclusiveGateway_15492gl" />
+ <bpmn:scriptTask id="timeDelay_Task" name="timeDelay" scriptFormat="groovy">
+ <bpmn:incoming>terminateProcessing_SequenceFlow</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1gsbpxj</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.timeDelay(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1gsbpxj" sourceRef="timeDelay_Task" targetRef="queryJob_Task" />
+ <bpmn:sequenceFlow id="SequenceFlow_150q0fo" sourceRef="PreprocessIncomingRequest_task" targetRef="deleteNSRelationship" />
+ <bpmn:sequenceFlow id="SequenceFlow_1sjop71" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_0zfksms" />
+ <bpmn:sequenceFlow id="deleteNSSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_0zfksms" targetRef="finishNSDelete_Task">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) == "finished")}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1h1c24p" sourceRef="deleteNSRelationship" targetRef="terminate_NSTask" />
+ <bpmn:scriptTask id="deleteNSRelationship" name="Delete NS Relationship " scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_150q0fo</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1h1c24p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.deleteNSRelationship(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNS_StartEvent">
+ <dc:Bounds x="175" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="147" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+ <di:waypoint xsi:type="dc:Point" x="211" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="321" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="221" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk">
+ <dc:Bounds x="722" y="555" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="321" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="terminate_NSTask">
+ <dc:Bounds x="744" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0zfksms_di" bpmnElement="ExclusiveGateway_0zfksms" isMarkerVisible="true">
+ <dc:Bounds x="517" y="570" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="624" width="52" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0df541u_di" bpmnElement="deleteNSFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="542" y="570" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="446" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="551" y="474.11353711790395" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1is7zys_di" bpmnElement="ExclusiveGateway_1is7zys" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="105" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1032" y="159" width="65" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ywe21t_di" bpmnElement="SequenceFlow_1ywe21t">
+ <di:waypoint xsi:type="dc:Point" x="844" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="1034" y="130" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="894" y="108.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j7xo94_di" bpmnElement="terminateFailed_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="105" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="33" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1068" y="63" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ui2n9l_di" bpmnElement="terminateSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="271" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="207" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_15492gl_di" bpmnElement="ExclusiveGateway_15492gl" isMarkerVisible="true">
+ <dc:Bounds x="1034" y="570" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1040" y="624" width="47" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hftgi6_di" bpmnElement="terminateFinished_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1034" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="822" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="574" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0omec46_di" bpmnElement="terminateProcessing_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1131" y="607" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cq2q6g_di" bpmnElement="SequenceFlow_0cq2q6g">
+ <di:waypoint xsi:type="dc:Point" x="321" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="243.5" y="574" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1ido9wi_di" bpmnElement="deleteNSFailed_EndEvent">
+ <dc:Bounds x="524" y="410" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="460" y="450" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0xgvlmx_di" bpmnElement="EndEvent_1gkvvpn">
+ <dc:Bounds x="1041" y="-3" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1014" y="37" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="220" y="577" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="148" y="617" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0sxy5we_di" bpmnElement="queryJob_Task">
+ <dc:Bounds x="1009" y="271" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSDelete_Task">
+ <dc:Bounds x="321" y="555" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xqo13p_di" bpmnElement="SequenceFlow_0xqo13p">
+ <di:waypoint xsi:type="dc:Point" x="1059" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1074" y="454.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0rb5agx_di" bpmnElement="timeDelay_Task">
+ <dc:Bounds x="1162" y="406" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gsbpxj_di" bpmnElement="SequenceFlow_1gsbpxj">
+ <di:waypoint xsi:type="dc:Point" x="1212" y="406" />
+ <di:waypoint xsi:type="dc:Point" x="1212" y="311" />
+ <di:waypoint xsi:type="dc:Point" x="1109" y="311" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1227" y="352.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_150q0fo_di" bpmnElement="SequenceFlow_150q0fo">
+ <di:waypoint xsi:type="dc:Point" x="421" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sjop71_di" bpmnElement="SequenceFlow_1sjop71">
+ <di:waypoint xsi:type="dc:Point" x="722" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="567" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644.5" y="574" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_18n2g9j_di" bpmnElement="deleteNSSuccess_SequenceFlow">
+ <di:waypoint xsi:type="dc:Point" x="517" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="595" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="460" y="574" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h1c24p_di" bpmnElement="SequenceFlow_1h1c24p">
+ <di:waypoint xsi:type="dc:Point" x="623" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="683.5" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11l4g48_di" bpmnElement="deleteNSRelationship">
+ <dc:Bounds x="523" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModule.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModule.bpmn
new file mode 100644
index 0000000000..848796c0b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModule.bpmn
@@ -0,0 +1,433 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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="DoDeleteVfModule" name="DoDeleteVfModule" isExecutable="true">
+ <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule &#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0fp1wqz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" />
+ <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke &#10;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="SDNCAdapterPrep2" />
+ <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke &#10;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="PUAAIVfMod_heatStackId" target="DoDVfMod_heatStackId" />
+ <camunda:out source="PUAAIVfMod_outVfModule" target="vfModuleFromAAI" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_029ioyr</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14xn858</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" />
+ <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke &#10;SDNCAdapterV1" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="sdncAdapterResponse" target="DoDVfMod_doDeleteVfModuleResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="validateSDNCResponse" />
+ <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter &#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_14xn858</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter &#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" />
+ <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke &#10;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_doDeleteVfModuleResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xruki1</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke &#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9" />
+ <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule &#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepDeleteAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule" />
+ <bpmn2:scriptTask id="validateSDNCResponse" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.sdncValidateResponse(execution, DoDVfMod_doDeleteVfModuleResponse)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="validateSDNCResponse" targetRef="DeleteAAIVfModulePrep" />
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="InitializeVariables" targetRef="PrepareUpdateAAIVfModulePrep" />
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="Task_0h2lui6" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" messageRef="Message_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn2:scriptTask id="DeleteNetworkPoliciesFromAAI" name="Delete Network Policies from AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0coa90m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08g02ch</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNFAdapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1xruki1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0coa90m</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0coa90m" sourceRef="PostProcessVNFAdapterRequest" targetRef="DeleteNetworkPoliciesFromAAI" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1drlnlk" name="need to update VNF in AAI?" default="SequenceFlow_0ep3hjm">
+ <bpmn2:incoming>SequenceFlow_08g02ch</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1yehsyc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ep3hjm</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08g02ch" sourceRef="DeleteNetworkPoliciesFromAAI" targetRef="ExclusiveGateway_1drlnlk" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yehsyc" name="yes" sourceRef="ExclusiveGateway_1drlnlk" targetRef="PreProcessUpdateAAIGenericVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DoDVfMod_oamManagementV4Address") != null || execution.getVariable("DoDVfMod_oamManagementV6Address") != null]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1a7lzhz" sourceRef="PreProcessUpdateAAIGenericVnf" targetRef="UpdateAAIGenericVnfTask" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0lsru7z">
+ <bpmn2:incoming>SequenceFlow_0ep3hjm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_14l7olw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0fp1wqz</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ep3hjm" name="no" sourceRef="ExclusiveGateway_1drlnlk" targetRef="ExclusiveGateway_0lsru7z" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14l7olw" sourceRef="UpdateAAIGenericVnfTask" targetRef="ExclusiveGateway_0lsru7z" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0fp1wqz" sourceRef="ExclusiveGateway_0lsru7z" targetRef="UpdateAAIVfModulePrep" />
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVnf" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1yehsyc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1a7lzhz</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doDeleteVfModule = new DoDeleteVfModule()
+doDeleteVfModule.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="UpdateAAIGenericVnfTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoDVfMod_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1a7lzhz</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14l7olw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_029ioyr" sourceRef="Task_0h2lui6" targetRef="InvokePrepareUpdateAAIVfModule" />
+ <bpmn2:scriptTask id="Task_0h2lui6" name="Query AAI for Orchestration Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_029ioyr</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.queryAAIVfModuleForStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xruki1" sourceRef="InvokeVNFAdapterRestV1" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14xn858" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="VNFAdapterPrep" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoDeleteVfModuleRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds x="34" y="57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="52" y="98" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds x="144" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="70" y="75" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="104" y="0" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
+ <dc:Bounds x="647" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
+ <dc:Bounds x="315" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="244" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="315" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="269" y="0" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="193" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="404" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="844" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="995" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">
+ <di:waypoint xsi:type="dc:Point" x="944" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="970" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="140" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="272" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="547" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="690" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="465" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="70" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="70" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="588" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
+ <di:waypoint xsi:type="dc:Point" x="240" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="706" />
+ <di:waypoint xsi:type="dc:Point" x="272" y="706" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="268" y="558" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="372" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="705" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">
+ <di:waypoint xsi:type="dc:Point" x="647" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="690" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="669" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="836" y="687" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="854" y="728" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">
+ <di:waypoint xsi:type="dc:Point" x="790" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="813" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="415" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="449" y="61" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="293" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="231" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">
+ <dc:Bounds x="404" y="665" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="504" y="705" />
+ <di:waypoint xsi:type="dc:Point" x="547" y="705" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526" y="690" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0la8haz_di" bpmnElement="DeleteNetworkPoliciesFromAAI">
+ <dc:Bounds x="202" y="385" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0lewl6b_di" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="620" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0coa90m_di" bpmnElement="SequenceFlow_0coa90m">
+ <di:waypoint xsi:type="dc:Point" x="720" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="333" />
+ <di:waypoint xsi:type="dc:Point" x="76" y="333" />
+ <di:waypoint xsi:type="dc:Point" x="76" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="500" y="318" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1drlnlk_di" bpmnElement="ExclusiveGateway_1drlnlk" isMarkerVisible="true">
+ <dc:Bounds x="415" y="400" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="402" y="362" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08g02ch_di" bpmnElement="SequenceFlow_08g02ch">
+ <di:waypoint xsi:type="dc:Point" x="302" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="415" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="359" y="410" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yehsyc_di" bpmnElement="SequenceFlow_1yehsyc">
+ <di:waypoint xsi:type="dc:Point" x="440" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="440" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="477" y="517" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="473" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a7lzhz_di" bpmnElement="SequenceFlow_1a7lzhz">
+ <di:waypoint xsi:type="dc:Point" x="577" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="654" y="517" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0lsru7z_di" bpmnElement="ExclusiveGateway_0lsru7z" isMarkerVisible="true">
+ <dc:Bounds x="759" y="400" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784" y="450" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ep3hjm_di" bpmnElement="SequenceFlow_0ep3hjm">
+ <di:waypoint xsi:type="dc:Point" x="465" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="400" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14l7olw_di" bpmnElement="SequenceFlow_14l7olw">
+ <di:waypoint xsi:type="dc:Point" x="754" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="784" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="784" y="450" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="769" y="502" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fp1wqz_di" bpmnElement="SequenceFlow_0fp1wqz">
+ <di:waypoint xsi:type="dc:Point" x="809" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="844" y="425" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="827" y="400" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_18y0guc_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="477" y="477" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kbqf50_di" bpmnElement="UpdateAAIGenericVnfTask">
+ <dc:Bounds x="654" y="477" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_029ioyr_di" bpmnElement="SequenceFlow_029ioyr">
+ <di:waypoint xsi:type="dc:Point" x="583" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="615" y="61" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_15vzlxw_di" bpmnElement="Task_0h2lui6">
+ <dc:Bounds x="483" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xruki1_di" bpmnElement="SequenceFlow_1xruki1">
+ <di:waypoint xsi:type="dc:Point" x="504" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="620" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="562" y="231" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14xn858_di" bpmnElement="SequenceFlow_14xn858">
+ <di:waypoint xsi:type="dc:Point" x="747" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="914" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="914" y="154" />
+ <di:waypoint xsi:type="dc:Point" x="71" y="154" />
+ <di:waypoint xsi:type="dc:Point" x="71" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="193" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="493" y="139" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleFromVnf.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleFromVnf.bpmn
new file mode 100644
index 0000000000..b7a1373fe9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleFromVnf.bpmn
@@ -0,0 +1,396 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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="DoDeleteVfModuleFromVnf" name="DoDeleteVfModuleFromVnf" isExecutable="true">
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1" />
+ <bpmn2:callActivity id="callSDNCAdapterTopologyUnassign" name="Call SDNC Adapter Topology Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DDVMFV_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="sdncAdapterResponse" target="DoDVfMod_doDeleteVfModuleResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="callSDNCAdapterTopologyUnassign" targetRef="validateSDNCResponse" />
+ <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter &#10;&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0kx9e3s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.prepVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter &#10;&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ltm4jt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.preProcessSDNCUnassignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="callSDNCAdapterTopologyUnassign" />
+ <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke &#10;&#10;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DDVMFV_doDeleteVfModuleResponse" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0hia88a</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_1eemrjp</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="validateSDNCResponse" name="PostProcess SDNC Adapter Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+String response = execution.getVariable("DDVMFV_deactivateSDNCAdapterResponse")
+ddvmfv.validateSDNCResponse(execution, response, "unassign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="validateSDNCResponse" targetRef="DeleteAAIVfModulePrep" />
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qbjihn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn2:scriptTask id="DeleteNetworkPoliciesFromAAI" name="Delete Network Policies from AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0coa90m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ltm4jt</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNFAdapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0hia88a</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0coa90m</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0coa90m" sourceRef="PostProcessVNFAdapterRequest" targetRef="DeleteNetworkPoliciesFromAAI" />
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0y4td40" sourceRef="preProcessSDNCDeactivateRequest" targetRef="callSDNCAdapterTopologyDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12q2r4i" sourceRef="callSDNCAdapterTopologyDeactivate" targetRef="postProcessSDNCDeactivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0hia88a" sourceRef="InvokeVNFAdapterRestV1" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0kx9e3s" sourceRef="postProcessSDNCDeactivateRequest" targetRef="VNFAdapterPrep" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ltm4jt" sourceRef="DeleteNetworkPoliciesFromAAI" targetRef="SDNCAdapterPrep2" />
+ <bpmn2:scriptTask id="preProcessSDNCDeactivateRequest" name="PreProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1igsfgk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y4td40</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.preProcessSDNCDeactivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterTopologyDeactivate" name="Call SDNC Adapter Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DDVMFV_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DDVMFV_deactivateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0y4td40</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12q2r4i</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCDeactivateRequest" name="PostProcess SDNC Adapter Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12q2r4i</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0kx9e3s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+String response = execution.getVariable("DDVMFV_deactivateSDNCAdapterResponse")
+ddvmfv.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qbjihn" sourceRef="InitializeVariables" targetRef="QueryAAIForVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c2lvlc" sourceRef="QueryAAIForVfModule" targetRef="ValidateVfModule" />
+ <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0qbjihn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c2lvlc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.queryAAIForVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1igsfgk" sourceRef="ValidateVfModule" targetRef="preProcessSDNCDeactivateRequest" />
+ <bpmn2:scriptTask id="ValidateVfModule" name="Validate VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1c2lvlc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1igsfgk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.validateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:subProcess id="SubProcess_1r8unf9" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1ebrix6">
+ <bpmn2:outgoing>SequenceFlow_095634c</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_15yfom3" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0yb2lmo">
+ <bpmn2:incoming>SequenceFlow_0yvjvhu</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1ypch9x" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_095634c</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0yvjvhu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_095634c" name="" sourceRef="StartEvent_1ebrix6" targetRef="ScriptTask_1ypch9x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0yvjvhu" name="" sourceRef="ScriptTask_1ypch9x" targetRef="EndEvent_0yb2lmo" />
+ </bpmn2:subProcess>
+ <bpmn2:callActivity id="DeleteAAIVfModule" name="Invoke &#10;&#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_092kvy3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1eemrjp</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule &#10;&#10;Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_092kvy3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvmfv = new DoDeleteVfModuleFromVnf()
+ddvmfv.prepDeleteAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_092kvy3" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="DeleteAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1eemrjp" sourceRef="DeleteAAIVfModule" targetRef="EndEvent_9" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoDeleteVfModuleRequest" />
+ <bpmn2:error id="Error_15yfom3" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVfModuleFromVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds x="144" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="70" y="75" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="107" y="60.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="125" y="330" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="281" y="330" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="129" y="487" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="callSDNCAdapterTopologyUnassign">
+ <dc:Bounds x="281" y="487" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
+ <di:waypoint xsi:type="dc:Point" x="229" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="281" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="255" y="512.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="381" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="403" y="512" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="873" y="509" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="891" y="550" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="225" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="281" y="370" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="253" y="355" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">
+ <dc:Bounds x="425" y="487" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_251">
+ <di:waypoint xsi:type="dc:Point" x="525" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="570" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="527" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0la8haz_di" bpmnElement="DeleteNetworkPoliciesFromAAI">
+ <dc:Bounds x="581" y="330" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0lewl6b_di" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="430" y="330" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0coa90m_di" bpmnElement="SequenceFlow_0coa90m">
+ <di:waypoint xsi:type="dc:Point" x="530" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="581" y="370" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="556" y="355" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_1mifg2p_di" bpmnElement="StartEvent_1">
+ <dc:Bounds x="34" y="57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="52" y="98" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y4td40_di" bpmnElement="SequenceFlow_0y4td40">
+ <di:waypoint xsi:type="dc:Point" x="268" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="288" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="288" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="316" y="219" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="303" y="219" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12q2r4i_di" bpmnElement="SequenceFlow_12q2r4i">
+ <di:waypoint xsi:type="dc:Point" x="416" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="219" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="204" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hia88a_di" bpmnElement="SequenceFlow_0hia88a">
+ <di:waypoint xsi:type="dc:Point" x="381" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="370" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="406" y="345" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kx9e3s_di" bpmnElement="SequenceFlow_0kx9e3s">
+ <di:waypoint xsi:type="dc:Point" x="564" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="219" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="39" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="39" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="125" y="370" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="401" y="278" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ltm4jt_di" bpmnElement="SequenceFlow_0ltm4jt">
+ <di:waypoint xsi:type="dc:Point" x="681" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="370" />
+ <di:waypoint xsi:type="dc:Point" x="759" y="442" />
+ <di:waypoint xsi:type="dc:Point" x="51" y="442" />
+ <di:waypoint xsi:type="dc:Point" x="51" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="129" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="405" y="427" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1boza4q_di" bpmnElement="preProcessSDNCDeactivateRequest">
+ <dc:Bounds x="168" y="179" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0xpc0da_di" bpmnElement="callSDNCAdapterTopologyDeactivate">
+ <dc:Bounds x="316" y="179" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1kkyngh_di" bpmnElement="postProcessSDNCDeactivateRequest">
+ <dc:Bounds x="464" y="179" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qbjihn_di" bpmnElement="SequenceFlow_0qbjihn">
+ <di:waypoint xsi:type="dc:Point" x="244" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="316" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="280" y="61" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c2lvlc_di" bpmnElement="SequenceFlow_1c2lvlc">
+ <di:waypoint xsi:type="dc:Point" x="416" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="473" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="445" y="61" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gf22c0_di" bpmnElement="QueryAAIForVfModule">
+ <dc:Bounds x="316" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1igsfgk_di" bpmnElement="SequenceFlow_1igsfgk">
+ <di:waypoint xsi:type="dc:Point" x="573" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="145" />
+ <di:waypoint xsi:type="dc:Point" x="34" y="145" />
+ <di:waypoint xsi:type="dc:Point" x="34" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="168" y="219" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="130" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1jgeknl_di" bpmnElement="ValidateVfModule">
+ <dc:Bounds x="473" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1r8unf9_di" bpmnElement="SubProcess_1r8unf9" isExpanded="true">
+ <dc:Bounds x="43" y="622" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1ebrix6_di" bpmnElement="StartEvent_1ebrix6">
+ <dc:Bounds x="111" y="689" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="730" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0yb2lmo_di" bpmnElement="EndEvent_0yb2lmo">
+ <dc:Bounds x="404" y="689" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="422" y="730" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ypch9x_di" bpmnElement="ScriptTask_1ypch9x">
+ <dc:Bounds x="215" y="667" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_095634c_di" bpmnElement="SequenceFlow_095634c">
+ <di:waypoint xsi:type="dc:Point" x="147" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="215" y="707" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="181" y="692" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yvjvhu_di" bpmnElement="SequenceFlow_0yvjvhu">
+ <di:waypoint xsi:type="dc:Point" x="315" y="707" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="707" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="360" y="692" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_10td9ns_di" bpmnElement="DeleteAAIVfModule">
+ <dc:Bounds x="713" y="487" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1rcw5x3_di" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="570" y="487" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_092kvy3_di" bpmnElement="SequenceFlow_092kvy3">
+ <di:waypoint xsi:type="dc:Point" x="670" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="692" y="512" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eemrjp_di" bpmnElement="SequenceFlow_1eemrjp">
+ <di:waypoint xsi:type="dc:Point" x="813" y="527" />
+ <di:waypoint xsi:type="dc:Point" x="873" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="502" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleVolumeV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleVolumeV2.bpmn
new file mode 100644
index 0000000000..4409f2a0dc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVfModuleVolumeV2.bpmn
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+ <bpmn:process id="DoDeleteVfModuleVolumeV2" name="DoDeleteVfModuleVolumeV2" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Start">
+ <bpmn:outgoing>SequenceFlow_1gvfdp4</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_06u1lr0" name="Call REST AAI Query Cloud Region" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1vy2ojp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1dlcqmc</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def delVfModuleVol = new DoDeleteVfModuleVolumeV2()
+delVfModuleVol.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1woqfjw" name="Call REST AAI Query for Volume Group" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1dlcqmc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1kjccf1</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DoDeleteVfModuleVolumeV2()
+deleteVfMod.executeMethod('callRESTQueryAAIForVolumeGroup', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_0yjx0p2" name="Prepare VNF Adapter Delete" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1kjccf1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1tgngf7</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DoDeleteVfModuleVolumeV2()
+deleteVfMod.executeMethod('prepareVnfAdapterDeleteRequest', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_14fsstq" name="Call REST VNF Adapter Delete" calledElement="vnfAdapterRestV1">
+ <bpmn:extensionElements>
+ <camunda:in source="DDVMV_deleteVnfARequest" target="vnfAdapterRestV1Request" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in variables="all" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DDVMV_deleteVnfAResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1tgngf7</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1x3luyj</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_17q1roq" name="Call REST AAI Delete Volume Group" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0cy0y9t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13c3cv2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DoDeleteVfModuleVolumeV2()
+deleteVfMod.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_0fw1gkf" name="Stop">
+ <bpmn:incoming>SequenceFlow_1sgtwr2</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1dlcqmc" sourceRef="Task_06u1lr0" targetRef="Task_1woqfjw" />
+ <bpmn:sequenceFlow id="SequenceFlow_1kjccf1" sourceRef="Task_1woqfjw" targetRef="Task_0yjx0p2" />
+ <bpmn:sequenceFlow id="SequenceFlow_1tgngf7" sourceRef="Task_0yjx0p2" targetRef="Task_14fsstq" />
+ <bpmn:scriptTask id="Task_1i432ud" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1gvfdp4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1vy2ojp</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DoDeleteVfModuleVolumeV2()
+deleteVfMod.executeMethod('preProcessRequest', execution, isDebugLogEnabled)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1gvfdp4" sourceRef="StartEvent_1" targetRef="Task_1i432ud" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vy2ojp" sourceRef="Task_1i432ud" targetRef="Task_06u1lr0" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0o3lxtf" name="VNF Adapter REST call success?">
+ <bpmn:incoming>SequenceFlow_1x3luyj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0cy0y9t</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1rgd8dg</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1x3luyj" sourceRef="Task_14fsstq" targetRef="ExclusiveGateway_0o3lxtf" />
+ <bpmn:sequenceFlow id="SequenceFlow_0cy0y9t" name="Yes" sourceRef="ExclusiveGateway_0o3lxtf" targetRef="Task_17q1roq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_00cohim" name="throw MSOException">
+ <bpmn:incoming>SequenceFlow_1rgd8dg</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_0fa7ks7" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1rgd8dg" sourceRef="ExclusiveGateway_0o3lxtf" targetRef="EndEvent_00cohim" />
+ <bpmn:scriptTask id="Task_018w43g" name="Post Process" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_13c3cv2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sgtwr2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def deleteVfMod = new DoDeleteVfModuleVolumeV2()
+deleteVfMod.executeMethod('postProcess', execution, isDebugLogEnabled)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_13c3cv2" sourceRef="Task_17q1roq" targetRef="Task_018w43g" />
+ <bpmn:sequenceFlow id="SequenceFlow_1sgtwr2" sourceRef="Task_018w43g" targetRef="EndEvent_0fw1gkf" />
+ </bpmn:process>
+ <bpmn:error id="Error_0fa7ks7" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVfModuleVolumeV2">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="179" y="138" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1qojxu5_di" bpmnElement="Task_06u1lr0">
+ <dc:Bounds x="407" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1mht6f6_di" bpmnElement="Task_1woqfjw">
+ <dc:Bounds x="564" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_02ujn8y_di" bpmnElement="Task_0yjx0p2">
+ <dc:Bounds x="713" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0bf87en_di" bpmnElement="Task_14fsstq">
+ <dc:Bounds x="865" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_07kmkio_di" bpmnElement="Task_17q1roq">
+ <dc:Bounds x="1151" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0fw1gkf_di" bpmnElement="EndEvent_0fw1gkf">
+ <dc:Bounds x="1463" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1470" y="138" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dlcqmc_di" bpmnElement="SequenceFlow_1dlcqmc">
+ <di:waypoint xsi:type="dc:Point" x="507" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kjccf1_di" bpmnElement="SequenceFlow_1kjccf1">
+ <di:waypoint xsi:type="dc:Point" x="664" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tgngf7_di" bpmnElement="SequenceFlow_1tgngf7">
+ <di:waypoint xsi:type="dc:Point" x="813" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="839" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wjwf8w_di" bpmnElement="Task_1i432ud">
+ <dc:Bounds x="247" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gvfdp4_di" bpmnElement="SequenceFlow_1gvfdp4">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="247" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="228" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vy2ojp_di" bpmnElement="SequenceFlow_1vy2ojp">
+ <di:waypoint xsi:type="dc:Point" x="347" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="407" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="377" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0o3lxtf_di" bpmnElement="ExclusiveGateway_0o3lxtf" isMarkerVisible="true">
+ <dc:Bounds x="1028" y="95" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1020" y="145" width="66" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x3luyj_di" bpmnElement="SequenceFlow_1x3luyj">
+ <di:waypoint xsi:type="dc:Point" x="965" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1028" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="997" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cy0y9t_di" bpmnElement="SequenceFlow_0cy0y9t">
+ <di:waypoint xsi:type="dc:Point" x="1078" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1151" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1106" y="95" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0zln0ww_di" bpmnElement="EndEvent_00cohim">
+ <dc:Bounds x="1035" y="274" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1016" y="310" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rgd8dg_di" bpmnElement="SequenceFlow_1rgd8dg">
+ <di:waypoint xsi:type="dc:Point" x="1053" y="145" />
+ <di:waypoint xsi:type="dc:Point" x="1053" y="274" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1068" y="199.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ilduoy_di" bpmnElement="Task_018w43g">
+ <dc:Bounds x="1298" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13c3cv2_di" bpmnElement="SequenceFlow_13c3cv2">
+ <di:waypoint xsi:type="dc:Point" x="1251" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1298" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1275" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sgtwr2_di" bpmnElement="SequenceFlow_1sgtwr2">
+ <di:waypoint xsi:type="dc:Point" x="1398" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1463" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1431" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnf.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnf.bpmn
new file mode 100644
index 0000000000..d9596f0d14
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnf.bpmn
@@ -0,0 +1,303 @@
+<?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="_9MhrcHqVEea26OhQB97uCQ" 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="DoDeleteVnf" name="DoDeleteVnf" isExecutable="true">
+ <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:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoDeleteVnf deleteVnf = new DoDeleteVnf()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="callGetVnf" />
+ <bpmn2:callActivity id="callGetVnf" name="Get&#10;&#10;Generic Vnf" calledElement="GenericGetVnf">
+ <bpmn2:extensionElements>
+ <camunda:out source="GENGV_vnf" target="DoDVNF_genericVnf" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator" />
+ <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator" />
+ <camunda:in source="DoDVNF_type" target="GENGV_type" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoDVNF_vnfId" target="GENGV_vnfId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callGetVnf" targetRef="vnfFoundCheck" />
+ <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="notFound">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>vnfFound</bpmn2:outgoing>
+ <bpmn2:outgoing>notFound</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="vnfFound" name="Yes" sourceRef="vnfFoundCheck" targetRef="processResponse">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator") == true && execution.getVariable("GENGV_SuccessIndicator") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="vnfFoundCheck" targetRef="IntermediateThrowEvent_1" />
+ <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>vnfFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoDeleteVnf deleteVnf = new DoDeleteVnf()
+deleteVnf.processGetVnfResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="processResponse" targetRef="vnfInUseCheck" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="Skip Delete">
+ <bpmn2:incoming>notFound</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="LinkEventDefinition_1" name="Skip Delete" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="vnfInUseCheck" name="Vnf In Use?" default="notInUse">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>inUse</bpmn2:outgoing>
+ <bpmn2:outgoing>notInUse</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="inUse" name="Yes" sourceRef="vnfInUseCheck" targetRef="createWorkflowExceptionInUse">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoDVNF_vnfInUse") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="notInUse" name="No" sourceRef="vnfInUseCheck" targetRef="deleteVnf" />
+ <bpmn2:scriptTask id="createWorkflowExceptionInUse" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>inUse</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Can't Delete Generic Vnf. Generic Vnf is still in use.")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="createWorkflowExceptionInUse" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_93" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="deleteVnf" targetRef="ExclusiveGateway_2" />
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_2" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Skip Delete">
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="LinkEventDefinition_2" name="Skip Delete" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ExclusiveGateway_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="deleteVnf" name="&#10;AAI&#10;Delete&#10;(generic vnf)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>notInUse</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoDeleteVnf delete = new DoDeleteVnf()
+delete.deleteVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="215" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="233" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="322" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="251" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="322" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="287" y="212.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="422" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="463" y="213" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_314" bpmnElement="processResponse">
+ <dc:Bounds x="704" y="291" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="callGetVnf">
+ <dc:Bounds x="504" y="188" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_236" bpmnElement="vnfInUseCheck" isMarkerVisible="true">
+ <dc:Bounds x="840" y="305" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="335" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_314" targetElement="_BPMNShape_ExclusiveGateway_236">
+ <di:waypoint xsi:type="dc:Point" x="804" y="331" />
+ <di:waypoint xsi:type="dc:Point" x="840" y="330" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="799" y="325" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_63" targetElement="_BPMNShape_ExclusiveGateway_237">
+ <di:waypoint xsi:type="dc:Point" x="604" y="228" />
+ <di:waypoint xsi:type="dc:Point" x="634" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="630" y="227" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="createWorkflowExceptionInUse">
+ <dc:Bounds x="912" y="196" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="inUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_ScriptTask_315">
+ <di:waypoint xsi:type="dc:Point" x="865" y="305" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="236" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="867" y="258" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="notInUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="ScriptTask_1ps8v06_di">
+ <di:waypoint xsi:type="dc:Point" x="865" y="355" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="424" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="424" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="874" y="384" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1100" y="218" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1118" y="259" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_236">
+ <di:waypoint xsi:type="dc:Point" x="1012" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="1100" y="236" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1062" y="236" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_237" bpmnElement="vnfFoundCheck" isMarkerVisible="true">
+ <dc:Bounds x="634" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="672" y="240" width="72" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="vnfFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_ScriptTask_314">
+ <di:waypoint xsi:type="dc:Point" x="659" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="659" y="331" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="331" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="659" y="288" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds x="740" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="143" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_IntermediateThrowEvent_2">
+ <di:waypoint xsi:type="dc:Point" x="659" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="659" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="740" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="144" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1174" y="405" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1192" y="446" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_238" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1062" y="398" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1087" y="453" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="ScriptTask_1ps8v06_di" targetElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1012" y="424" />
+ <di:waypoint xsi:type="dc:Point" x="1062" y="423" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="992" y="405.5" width="90" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1111" y="422" />
+ <di:waypoint xsi:type="dc:Point" x="1174" y="423" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1143" y="407.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="1069" y="492" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1051" y="533" width="73" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateCatchEvent_2" targetElement="_BPMNShape_ExclusiveGateway_238">
+ <di:waypoint xsi:type="dc:Point" x="1087" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="1087" y="448" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1084" y="462" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="379" y="614" width="312" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="408" y="675" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="426" y="716" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="624" y="675" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="642" y="716" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="486" y="653" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="444" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="486" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="465" y="693" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="586" y="693" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="693" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="605" y="693" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ps8v06_di" bpmnElement="deleteVnf">
+ <dc:Bounds x="912" y="384" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn
new file mode 100644
index 0000000000..4d6d0006e3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn
@@ -0,0 +1,490 @@
+<?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="_9MhrcHqVEea26OhQB97uCQ" 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="DoDeleteVnfAndModules" name="DoDeleteVnfAndModules" isExecutable="true">
+ <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:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08nd69s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoDeleteVnfAndModules deleteVnfAndModules = new DoDeleteVnfAndModules()
+deleteVnfAndModules.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_1uqlr6b</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1amun4k" name="Are there VF modules to delete?" default="SequenceFlow_1936oc0">
+ <bpmn2:incoming>SequenceFlow_0t4yszi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1tt31qu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1fccvli</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qrkdn3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1936oc0</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="DeleteVNF" name="Delete VNF" calledElement="DoDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="vnfId" target="vnfId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_05ujwz8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1x25m7t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uqlr6b</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_08nd69s" sourceRef="intialization" targetRef="QueryVnf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qrkdn3" name="yes" sourceRef="ExclusiveGateway_1amun4k" targetRef="PrepareModuleList">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DDVAM_nextModule") < execution.getVariable("DDVAM_moduleCount")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="DeleteVFModule" name="Delete VF Module" calledElement="DoDeleteVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="requestId" target="requestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="DDVAM_vfModuleId" target="vfModuleId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="DDVAM_vfModuleName" target="vfModuleName" />
+ <camunda:in source="DDVAM_vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="cloudConfiguration" target="cloudConfiguration" />
+ <camunda:in source="DDVAM_sdncVersion" target="sdncVersion" />
+ <camunda:in source="DDVAM_isVidRequest" target="isVidRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="retainResources" target="retainResources" />
+ <camunda:in source="aLaCarte" target="aLaCarte" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1xujrk5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0189gqf" name="Is SDNC Interaction Enabled?" default="SequenceFlow_05ujwz8">
+ <bpmn2:incoming>SequenceFlow_1936oc0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05ujwz8</bpmn2:outgoing>
+ <bpmn2:outgoing>SDNCInteractionEnabled2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1p4ycii" sourceRef="DeleteVFModule" targetRef="PostProcessDeleteVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t4yszi" sourceRef="PostProcessDeleteVfModule" targetRef="ExclusiveGateway_1amun4k" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1936oc0" name="no" sourceRef="ExclusiveGateway_1amun4k" targetRef="ExclusiveGateway_0189gqf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_05ujwz8" name="no" sourceRef="ExclusiveGateway_0189gqf" targetRef="DeleteVNF" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1uqlr6b" sourceRef="DeleteVNF" targetRef="EndEvent_2" />
+ <bpmn2:scriptTask id="QueryVnf" name="Query VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_08nd69s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lu7b1v</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+ddvam.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PrepareModuleList" name="Prepare Next Module To Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qrkdn3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qoor0l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+ddvam.prepareNextModuleToDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lu7b1v" sourceRef="QueryVnf" targetRef="ExclusiveGateway_027lai5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qoor0l" sourceRef="PrepareModuleList" targetRef="ExclusiveGateway_0b36mti" />
+ <bpmn2:scriptTask id="PostProcessDeleteVfModule" name="PostProcess Delete VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0xl033m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+int nextModule = execution.getVariable("DDVAM_nextModule")
+ execution.setVariable("DDVAM_nextModule", nextModule + 1)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_027lai5" name="Is SDNC Interaction Enabled?" default="SequenceFlow_1tt31qu">
+ <bpmn2:incoming>SequenceFlow_0lu7b1v</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1tt31qu</bpmn2:outgoing>
+ <bpmn2:outgoing>SDNCInteractionEnabled1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tt31qu" name="no" sourceRef="ExclusiveGateway_027lai5" targetRef="ExclusiveGateway_1amun4k" />
+ <bpmn2:sequenceFlow id="SDNCInteractionEnabled1" name="yes" sourceRef="ExclusiveGateway_027lai5" targetRef="preProcessSDNCDeactivateRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0fhhsyo" sourceRef="preProcessSDNCDeactivateRequest" targetRef="callSDNCAdapterTopologyDeactivate" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qdn8k4" sourceRef="callSDNCAdapterTopologyDeactivate" targetRef="postProcessSDNCDeactivateRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1fccvli" sourceRef="postProcessSDNCDeactivateRequest" targetRef="ExclusiveGateway_1amun4k" />
+ <bpmn2:scriptTask id="preProcessSDNCDeactivateRequest" name="PreProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SDNCInteractionEnabled1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0fhhsyo</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+ddvam.preProcessSDNCDeactivateRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="postProcessSDNCDeactivateRequest" name="PostProcess SDNC Deactivate Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0qdn8k4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fccvli</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+String response = execution.getVariable("DDVAM_deactivateSDNCAdapterResponse")
+ddvam.validateSDNCResponse(execution, response, "deactivate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterTopologyDeactivate" name="Call SDNC Adapter Topology Deactivate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DDVAM_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DDVAM_deactivateSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0fhhsyo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qdn8k4</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SDNCInteractionEnabled2" name="yes" sourceRef="ExclusiveGateway_0189gqf" targetRef="preProcessSDNCUnassignRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_001uxa1" sourceRef="preProcessSDNCUnassignRequest" targetRef="callSDNCAdapterTopologyUnassign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x29mht" sourceRef="callSDNCAdapterTopologyUnassign" targetRef="postProcessSDNCUnassignRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x25m7t" sourceRef="postProcessSDNCUnassignRequest" targetRef="DeleteVNF" />
+ <bpmn2:scriptTask id="preProcessSDNCUnassignRequest" name="PreProcess SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SDNCInteractionEnabled2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_001uxa1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+ddvam.preProcessSDNCUnassignRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="callSDNCAdapterTopologyUnassign" name="Call SDNC Adapter Topology Unassign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DDVAM_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DDVAM_unassignSDNCAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_001uxa1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1x29mht</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="postProcessSDNCUnassignRequest" name="PostProcess SDNC Unassign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1x29mht</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1x25m7t</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+String response = execution.getVariable("DDVAM_unassignSDNCAdapterResponse")
+ddvam.validateSDNCResponse(execution, response, "unassign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0b36mti" name="Is SDNC Interaction Enabled?" default="SequenceFlow_1xujrk5">
+ <bpmn2:incoming>SequenceFlow_1qoor0l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1xujrk5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1laeenc</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="DoDeleteVfModuleFromVnf" name="Deiete VF Module From VNF" calledElement="DoDeleteVfModuleFromVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="DDVAM_sdncVersion" target="sdncVersion" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DDVAM_vfModuleId" target="vfModuleId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1laeenc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xl033m</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xujrk5" name="no" sourceRef="ExclusiveGateway_0b36mti" targetRef="DeleteVFModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1laeenc" name="yes" sourceRef="ExclusiveGateway_0b36mti" targetRef="DoDeleteVfModuleFromVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DDVAM_sdncVersion" ) != '1702'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0xl033m" sourceRef="DoDeleteVfModuleFromVnf" targetRef="PostProcessDeleteVfModule" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="238" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="344" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="274" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="344" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="212.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1983" y="372" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2001" y="413" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="229" y="616" width="431" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="377" y="677" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="395" y="718" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="593" y="677" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" y="718" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="447" y="655" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="413" y="695" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="695" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="430" y="680" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="547" y="695" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="695" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="570" y="680" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true">
+ <dc:Bounds x="1271" y="200" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1263" y="250" width="65" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0laaqvh_di" bpmnElement="DeleteVNF">
+ <dc:Bounds x="1812" y="350" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08nd69s_di" bpmnElement="SequenceFlow_08nd69s">
+ <di:waypoint xsi:type="dc:Point" x="444" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="512" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="478" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qrkdn3_di" bpmnElement="SequenceFlow_1qrkdn3">
+ <di:waypoint xsi:type="dc:Point" x="1296" y="200" />
+ <di:waypoint xsi:type="dc:Point" x="1296" y="102" />
+ <di:waypoint xsi:type="dc:Point" x="1368" y="102" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1302" y="154" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="DeleteVFModule">
+ <dc:Bounds x="1648" y="-9" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0189gqf_di" bpmnElement="ExclusiveGateway_0189gqf" isMarkerVisible="true">
+ <dc:Bounds x="1271" y="365" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1302" y="319" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii">
+ <di:waypoint xsi:type="dc:Point" x="1748" y="31" />
+ <di:waypoint xsi:type="dc:Point" x="1904" y="31" />
+ <di:waypoint xsi:type="dc:Point" x="1904" y="62" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1826" y="16" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi">
+ <di:waypoint xsi:type="dc:Point" x="1904" y="142" />
+ <di:waypoint xsi:type="dc:Point" x="1904" y="225" />
+ <di:waypoint xsi:type="dc:Point" x="1321" y="225" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1919" y="183.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1936oc0_di" bpmnElement="SequenceFlow_1936oc0">
+ <di:waypoint xsi:type="dc:Point" x="1296" y="250" />
+ <di:waypoint xsi:type="dc:Point" x="1296" y="365" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1270" y="305.40625" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05ujwz8_di" bpmnElement="SequenceFlow_05ujwz8">
+ <di:waypoint xsi:type="dc:Point" x="1321" y="390" />
+ <di:waypoint xsi:type="dc:Point" x="1812" y="390" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1361" y="362" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uqlr6b_di" bpmnElement="SequenceFlow_1uqlr6b">
+ <di:waypoint xsi:type="dc:Point" x="1912" y="390" />
+ <di:waypoint xsi:type="dc:Point" x="1983" y="390" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1948" y="375" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_12xsp2f_di" bpmnElement="QueryVnf">
+ <dc:Bounds x="512" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01c9qas_di" bpmnElement="PrepareModuleList">
+ <dc:Bounds x="1368" y="62" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lu7b1v_di" bpmnElement="SequenceFlow_0lu7b1v">
+ <di:waypoint xsi:type="dc:Point" x="612" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="701" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="657" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qoor0l_di" bpmnElement="SequenceFlow_1qoor0l">
+ <di:waypoint xsi:type="dc:Point" x="1468" y="102" />
+ <di:waypoint xsi:type="dc:Point" x="1525" y="102" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1497" y="87" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessDeleteVfModule">
+ <dc:Bounds x="1854" y="62" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_027lai5_di" bpmnElement="ExclusiveGateway_027lai5" isMarkerVisible="true">
+ <dc:Bounds x="701" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="145" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tt31qu_di" bpmnElement="SequenceFlow_1tt31qu">
+ <di:waypoint xsi:type="dc:Point" x="751" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1271" y="225" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1005" y="201" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04lnhgt_di" bpmnElement="SDNCInteractionEnabled1">
+ <di:waypoint xsi:type="dc:Point" x="726" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="337" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="337" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="694" y="280.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fhhsyo_di" bpmnElement="SequenceFlow_0fhhsyo">
+ <di:waypoint xsi:type="dc:Point" x="876" y="337" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="337" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="901" y="322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qdn8k4_di" bpmnElement="SequenceFlow_0qdn8k4">
+ <di:waypoint xsi:type="dc:Point" x="1026" y="337" />
+ <di:waypoint xsi:type="dc:Point" x="1070" y="337" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1048" y="322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fccvli_di" bpmnElement="SequenceFlow_1fccvli">
+ <di:waypoint xsi:type="dc:Point" x="1170" y="337" />
+ <di:waypoint xsi:type="dc:Point" x="1225" y="337" />
+ <di:waypoint xsi:type="dc:Point" x="1225" y="225" />
+ <di:waypoint xsi:type="dc:Point" x="1271" y="225" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1240" y="281" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1cj4pgd_di" bpmnElement="preProcessSDNCDeactivateRequest">
+ <dc:Bounds x="776" y="297" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1nug5hb_di" bpmnElement="postProcessSDNCDeactivateRequest">
+ <dc:Bounds x="1070" y="297" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sl24xf_di" bpmnElement="callSDNCAdapterTopologyDeactivate">
+ <dc:Bounds x="926" y="297" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ftrgor_di" bpmnElement="SDNCInteractionEnabled2">
+ <di:waypoint xsi:type="dc:Point" x="1296" y="415" />
+ <di:waypoint xsi:type="dc:Point" x="1296" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1266" y="445.36046511627904" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_001uxa1_di" bpmnElement="SequenceFlow_001uxa1">
+ <di:waypoint xsi:type="dc:Point" x="1456" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1517" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1487" y="486" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x29mht_di" bpmnElement="SequenceFlow_1x29mht">
+ <di:waypoint xsi:type="dc:Point" x="1617" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1678" y="501" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1648" y="486" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x25m7t_di" bpmnElement="SequenceFlow_1x25m7t">
+ <di:waypoint xsi:type="dc:Point" x="1778" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1862" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="1862" y="430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1820" y="486" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_167oslm_di" bpmnElement="preProcessSDNCUnassignRequest">
+ <dc:Bounds x="1356" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0cv258c_di" bpmnElement="callSDNCAdapterTopologyUnassign">
+ <dc:Bounds x="1517" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1gb4lqf_di" bpmnElement="postProcessSDNCUnassignRequest">
+ <dc:Bounds x="1678" y="461" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0b36mti_di" bpmnElement="ExclusiveGateway_0b36mti" isMarkerVisible="true">
+ <dc:Bounds x="1525" y="77" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1581" y="84" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1y4alqc_di" bpmnElement="DoDeleteVfModuleFromVnf">
+ <dc:Bounds x="1648" y="121" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xujrk5_di" bpmnElement="SequenceFlow_1xujrk5">
+ <di:waypoint xsi:type="dc:Point" x="1550" y="77" />
+ <di:waypoint xsi:type="dc:Point" x="1550" y="31" />
+ <di:waypoint xsi:type="dc:Point" x="1648" y="31" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1524" y="42" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1laeenc_di" bpmnElement="SequenceFlow_1laeenc">
+ <di:waypoint xsi:type="dc:Point" x="1550" y="127" />
+ <di:waypoint xsi:type="dc:Point" x="1550" y="161" />
+ <di:waypoint xsi:type="dc:Point" x="1648" y="161" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1523" y="135" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xl033m_di" bpmnElement="SequenceFlow_0xl033m">
+ <di:waypoint xsi:type="dc:Point" x="1748" y="161" />
+ <di:waypoint xsi:type="dc:Point" x="1828" y="161" />
+ <di:waypoint xsi:type="dc:Point" x="1828" y="102" />
+ <di:waypoint xsi:type="dc:Point" x="1854" y="102" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1843" y="131.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn
new file mode 100644
index 0000000000..fa8a2213b0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+ <bpmn:process id="DoScaleE2EServiceInstance" name="DoScaleE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_08ndnk6" name="Start Flow">
+ <bpmn:outgoing>SequenceFlow_1fhno84</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="ScriptTask_16yrgke" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1fhno84</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_194bhkx</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoScaleE2EServiceInstance()
+ddsi.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_1f5ursk">
+ <bpmn:incoming>SequenceFlow_1yee730</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0vmzliy" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_194bhkx</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0b5p6gy</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoScaleE2EServiceInstance()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_17d588b" name="Init Resource Oper Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_openecomp_adapters_db_endpoint}</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_initResOperStatusRequest}</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_0b5p6gy</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0nqrq1k</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:callActivity id="CallActivity_1jkl1i3" name="Call Network Service Scale" calledElement="DoScaleVFCServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resouceTemplateUUID" target="resouceTemplateUUID" />
+ <camunda:in source="resouceInstanceId" target="resouceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="nsScaleParams" target="nsScaleParams" />
+ <camunda:in source="bpmnRequest" target="bpmnRequest" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="nodeTemplateUUID" target="nodeTemplateUUID" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="requestDescription" target="requestDescription" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0nqrq1k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yee730</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1fhno84" sourceRef="StartEvent_08ndnk6" targetRef="ScriptTask_16yrgke" />
+ <bpmn:sequenceFlow id="SequenceFlow_194bhkx" sourceRef="ScriptTask_16yrgke" targetRef="ScriptTask_0vmzliy" />
+ <bpmn:sequenceFlow id="SequenceFlow_1yee730" sourceRef="CallActivity_1jkl1i3" targetRef="EndEvent_1f5ursk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0nqrq1k" sourceRef="ServiceTask_17d588b" targetRef="CallActivity_1jkl1i3" />
+ <bpmn:sequenceFlow id="SequenceFlow_0b5p6gy" sourceRef="ScriptTask_0vmzliy" targetRef="ServiceTask_17d588b" />
+ <bpmn:subProcess id="SubProcess_19qmltk" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0581c7y">
+ <bpmn:outgoing>SequenceFlow_0yyws1p</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0k146bt">
+ <bpmn:incoming>SequenceFlow_0i814ke</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0l79kxj" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0yyws1p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0i814ke</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0yyws1p" name="" sourceRef="StartEvent_0581c7y" targetRef="ScriptTask_0l79kxj" />
+ <bpmn:sequenceFlow id="SequenceFlow_0i814ke" name="" sourceRef="ScriptTask_0l79kxj" targetRef="EndEvent_0k146bt" />
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoScaleE2EServiceInstance">
+ <bpmndi:BPMNShape id="StartEvent_08ndnk6_di" bpmnElement="StartEvent_08ndnk6">
+ <dc:Bounds x="96" y="129" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="170" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_16yrgke_di" bpmnElement="ScriptTask_16yrgke">
+ <dc:Bounds x="189" y="107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1f5ursk_di" bpmnElement="EndEvent_1f5ursk">
+ <dc:Bounds x="1016" y="279" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="899" y="320" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0vmzliy_di" bpmnElement="ScriptTask_0vmzliy">
+ <dc:Bounds x="436" y="107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_17d588b_di" bpmnElement="ServiceTask_17d588b">
+ <dc:Bounds x="695" y="107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1jkl1i3_di" bpmnElement="CallActivity_1jkl1i3">
+ <dc:Bounds x="984" y="107" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fhno84_di" bpmnElement="SequenceFlow_1fhno84">
+ <di:waypoint xsi:type="dc:Point" x="132" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="189" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_194bhkx_di" bpmnElement="SequenceFlow_194bhkx">
+ <di:waypoint xsi:type="dc:Point" x="289" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="436" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="317.5" y="126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yee730_di" bpmnElement="SequenceFlow_1yee730">
+ <di:waypoint xsi:type="dc:Point" x="1033" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="1034" y="279" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="988.5" y="212" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nqrq1k_di" bpmnElement="SequenceFlow_0nqrq1k">
+ <di:waypoint xsi:type="dc:Point" x="795" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="844.5" y="126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b5p6gy_di" bpmnElement="SequenceFlow_0b5p6gy">
+ <di:waypoint xsi:type="dc:Point" x="536" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="695" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="570.5" y="126" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_19qmltk_di" bpmnElement="SubProcess_19qmltk" isExpanded="true">
+ <dc:Bounds x="132" y="351" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0581c7y_di" bpmnElement="StartEvent_0581c7y">
+ <dc:Bounds x="201" y="419" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="460" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0k146bt_di" bpmnElement="EndEvent_0k146bt">
+ <dc:Bounds x="494" y="419" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="377" y="460" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0l79kxj_di" bpmnElement="ScriptTask_0l79kxj">
+ <dc:Bounds x="305" y="397" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yyws1p_di" bpmnElement="SequenceFlow_0yyws1p">
+ <di:waypoint xsi:type="dc:Point" x="237" y="437" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="437" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="136" y="422" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0i814ke_di" bpmnElement="SequenceFlow_0i814ke">
+ <di:waypoint xsi:type="dc:Point" x="405" y="437" />
+ <di:waypoint xsi:type="dc:Point" x="494" y="437" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="317" y="422" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleVFCServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleVFCServiceInstance.bpmn
new file mode 100644
index 0000000000..f8b1ba5bee
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleVFCServiceInstance.bpmn
@@ -0,0 +1,89 @@
+<?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.10.0">
+ <bpmn:process id="DoScaleVFCServiceInstance" name="DoScaleVFCServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="scaleNS_StartEvent" name="scaleNS_StartEvent">
+ <bpmn:outgoing>SequenceFlow_00w1ntj</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="PreprocessIncomingRequest" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_00w1ntj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0izumqq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoScaleVFCNetworkServiceInstance()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_0ia872k" name="Scale Network Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0izumqq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0hzy01n</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoScaleVFCNetworkServiceInstance()
+dcsi.scaleNetworkService(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_00w1ntj" sourceRef="scaleNS_StartEvent" targetRef="PreprocessIncomingRequest_task" />
+ <bpmn:sequenceFlow id="SequenceFlow_0izumqq" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0ia872k" />
+ <bpmn:endEvent id="EndEvent_1r0dxhy">
+ <bpmn:incoming>SequenceFlow_18hdal9</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_18hdal9" sourceRef="finishNSScale_Task" targetRef="EndEvent_1r0dxhy" />
+ <bpmn:scriptTask id="finishNSScale_Task" name="Finish NS Scale" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0hzy01n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18hdal9</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoScaleVFCNetworkServiceInstance()
+dcsi.finishNSScale(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0hzy01n" sourceRef="Task_0ia872k" targetRef="finishNSScale_Task" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoScaleVFCServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="scaleNS_StartEvent">
+ <dc:Bounds x="-33" y="182" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-56" y="218" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0fxwmkv_di" bpmnElement="PreprocessIncomingRequest_task">
+ <dc:Bounds x="117" y="160" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_14ppugf_di" bpmnElement="Task_0ia872k">
+ <dc:Bounds x="739" y="160" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_00w1ntj_di" bpmnElement="SequenceFlow_00w1ntj">
+ <di:waypoint xsi:type="dc:Point" x="3" y="200" />
+ <di:waypoint xsi:type="dc:Point" x="117" y="200" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="15" y="179" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0izumqq_di" bpmnElement="SequenceFlow_0izumqq">
+ <di:waypoint xsi:type="dc:Point" x="217" y="200" />
+ <di:waypoint xsi:type="dc:Point" x="739" y="200" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="179" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1r0dxhy_di" bpmnElement="EndEvent_1r0dxhy">
+ <dc:Bounds x="771" y="676" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="744" y="716" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18hdal9_di" bpmnElement="SequenceFlow_18hdal9">
+ <di:waypoint xsi:type="dc:Point" x="789" y="451" />
+ <di:waypoint xsi:type="dc:Point" x="789" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="759" y="557.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1elwlqc_di" bpmnElement="finishNSScale_Task">
+ <dc:Bounds x="739" y="371" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0hzy01n_di" bpmnElement="SequenceFlow_0hzy01n">
+ <di:waypoint xsi:type="dc:Point" x="789" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="789" y="371" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="759" y="299.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn
new file mode 100644
index 0000000000..ad79d471af
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn
@@ -0,0 +1,293 @@
+<?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.6.0">
+ <bpmn:process id="DoUnderlayVpnOperation" name="DoUnderlayVpnOperation" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_0trm4dk</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0vvnd7x" name="is response ok?" default="SequenceFlow_083crve">
+ <bpmn:incoming>SequenceFlow_1vncx6p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1amfirn</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_083crve</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_14p1b2x">
+ <bpmn:incoming>SequenceFlow_10j9lbs</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_0urwhzh">
+ <bpmn:incoming>SequenceFlow_083crve</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0al8gdl</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1ajtcbe" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0trm4dk" sourceRef="StartEvent_1" targetRef="Task_0p43ddw" />
+ <bpmn:sequenceFlow id="SequenceFlow_1amfirn" name="ok" sourceRef="ExclusiveGateway_0vvnd7x" targetRef="ServiceTask_1uy6bdu">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_083crve" name="error" sourceRef="ExclusiveGateway_0vvnd7x" targetRef="EndEvent_0urwhzh" />
+ <bpmn:serviceTask id="Task_0brg0a4" name="call sdnc network operation" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_0h35z1p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07bp14s</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0p43ddw" name="call SdncUnderlayVpnPreprocessTask" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncUnderlayVpnPreprocessTask">
+ <bpmn:incoming>SequenceFlow_0trm4dk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_199ig0b</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0qsgg4i" name="Is create?" default="SequenceFlow_0h35z1p">
+ <bpmn:incoming>SequenceFlow_199ig0b</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rj6k5t</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0h35z1p</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_199ig0b" sourceRef="Task_0p43ddw" targetRef="ExclusiveGateway_0qsgg4i" />
+ <bpmn:serviceTask id="Task_0rfvkh0" name="call SdncServiceTopologyOperationTask" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1rj6k5t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1vncx6p</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1rj6k5t" name="yes" sourceRef="ExclusiveGateway_0qsgg4i" targetRef="Task_0rfvkh0">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("resourceOperType")=='create'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0h35z1p" name="no" sourceRef="ExclusiveGateway_0qsgg4i" targetRef="Task_0brg0a4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vncx6p" sourceRef="Task_0rfvkh0" targetRef="ExclusiveGateway_0vvnd7x" />
+ <bpmn:serviceTask id="ServiceTask_1uy6bdu" name="call sdnc network operation" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1amfirn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0bsmh51</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0bsmh51" sourceRef="ServiceTask_1uy6bdu" targetRef="ExclusiveGateway_09xxhiu" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_09xxhiu" name="is response ok?" default="SequenceFlow_0al8gdl">
+ <bpmn:incoming>SequenceFlow_0bsmh51</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10j9lbs</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0al8gdl</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_10j9lbs" name="ok" sourceRef="ExclusiveGateway_09xxhiu" targetRef="EndEvent_14p1b2x">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1opobct" name="is response ok?" default="SequenceFlow_19glon5">
+ <bpmn:incoming>SequenceFlow_07bp14s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oz5grh</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_19glon5</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:serviceTask id="ServiceTask_0dixxe6" name="call SdncServiceTopologyOperationTask" camunda:class="org.onap.so.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1oz5grh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_06e7qr6</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1x7erbs" name="is response ok?" default="SequenceFlow_1q83qn9">
+ <bpmn:incoming>SequenceFlow_06e7qr6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0koi1ia</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1q83qn9</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_1tt5u77">
+ <bpmn:incoming>SequenceFlow_0koi1ia</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_0ggbe9w">
+ <bpmn:incoming>SequenceFlow_19glon5</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1q83qn9</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1ajtcbe" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0al8gdl" name="error" sourceRef="ExclusiveGateway_09xxhiu" targetRef="EndEvent_0urwhzh" />
+ <bpmn:sequenceFlow id="SequenceFlow_07bp14s" sourceRef="Task_0brg0a4" targetRef="ExclusiveGateway_1opobct" />
+ <bpmn:sequenceFlow id="SequenceFlow_1oz5grh" name="ok" sourceRef="ExclusiveGateway_1opobct" targetRef="ServiceTask_0dixxe6">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_06e7qr6" sourceRef="ServiceTask_0dixxe6" targetRef="ExclusiveGateway_1x7erbs" />
+ <bpmn:sequenceFlow id="SequenceFlow_0koi1ia" name="ok" sourceRef="ExclusiveGateway_1x7erbs" targetRef="EndEvent_1tt5u77">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_19glon5" name="error" sourceRef="ExclusiveGateway_1opobct" targetRef="EndEvent_0ggbe9w" />
+ <bpmn:sequenceFlow id="SequenceFlow_1q83qn9" name="error" sourceRef="ExclusiveGateway_1x7erbs" targetRef="EndEvent_0ggbe9w" />
+ </bpmn:process>
+ <bpmn:error id="Error_1ajtcbe" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUnderlayVpnOperation">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-38" y="193" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-65" y="229" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0vvnd7x_di" bpmnElement="ExclusiveGateway_0vvnd7x" isMarkerVisible="true">
+ <dc:Bounds x="593" y="26" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="578" y="80" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_14p1b2x_di" bpmnElement="EndEvent_14p1b2x">
+ <dc:Bounds x="1058" y="33" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1031" y="73" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0d0rf7s_di" bpmnElement="EndEvent_0urwhzh">
+ <dc:Bounds x="1058" y="-150" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1031" y="-110" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0trm4dk_di" bpmnElement="SequenceFlow_0trm4dk">
+ <di:waypoint xsi:type="dc:Point" x="-2" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="211" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="4" y="190" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1amfirn_di" bpmnElement="SequenceFlow_1amfirn">
+ <di:waypoint xsi:type="dc:Point" x="643" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="743" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="686.5" y="30.000000000000014" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_083crve_di" bpmnElement="SequenceFlow_083crve">
+ <di:waypoint xsi:type="dc:Point" x="618" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="-132" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="-132" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="628.1578947368421" y="-151.89147286821705" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_035xqek_di" bpmnElement="Task_0brg0a4">
+ <dc:Bounds x="392" y="379" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0bjsvlv_di" bpmnElement="Task_0p43ddw">
+ <dc:Bounds x="100" y="171" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0qsgg4i_di" bpmnElement="ExclusiveGateway_0qsgg4i" isMarkerVisible="true">
+ <dc:Bounds x="247.99837398373984" y="186" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="250" y="240" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_199ig0b_di" bpmnElement="SequenceFlow_199ig0b">
+ <di:waypoint xsi:type="dc:Point" x="200" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="211" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="190" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1omqxl9_di" bpmnElement="Task_0rfvkh0">
+ <dc:Bounds x="379" y="11" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rj6k5t_di" bpmnElement="SequenceFlow_1rj6k5t">
+ <di:waypoint xsi:type="dc:Point" x="273" y="186" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="379" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="279" y="112.5" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h35z1p_di" bpmnElement="SequenceFlow_0h35z1p">
+ <di:waypoint xsi:type="dc:Point" x="273" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="322" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vncx6p_di" bpmnElement="SequenceFlow_1vncx6p">
+ <di:waypoint xsi:type="dc:Point" x="479" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="30" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1uy6bdu_di" bpmnElement="ServiceTask_1uy6bdu">
+ <dc:Bounds x="743" y="11" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bsmh51_di" bpmnElement="SequenceFlow_0bsmh51">
+ <di:waypoint xsi:type="dc:Point" x="843" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="942" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="892.5" y="30" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09xxhiu_di" bpmnElement="ExclusiveGateway_09xxhiu" isMarkerVisible="true">
+ <dc:Bounds x="942" y="26" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="80" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10j9lbs_di" bpmnElement="SequenceFlow_10j9lbs">
+ <di:waypoint xsi:type="dc:Point" x="992" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1019" y="30" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1opobct_di" bpmnElement="ExclusiveGateway_1opobct" isMarkerVisible="true">
+ <dc:Bounds x="580" y="394" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="565" y="448" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0dixxe6_di" bpmnElement="ServiceTask_0dixxe6">
+ <dc:Bounds x="730" y="379" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x7erbs_di" bpmnElement="ExclusiveGateway_1x7erbs" isMarkerVisible="true">
+ <dc:Bounds x="951" y="394" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="448" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1tt5u77_di" bpmnElement="EndEvent_1tt5u77">
+ <dc:Bounds x="1083" y="401" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1056" y="441" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ggbe9w_di" bpmnElement="EndEvent_0ggbe9w">
+ <dc:Bounds x="1093" y="585" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="625" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0al8gdl_di" bpmnElement="SequenceFlow_0al8gdl">
+ <di:waypoint xsi:type="dc:Point" x="967" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="-132" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="-132" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="969" y="-59" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07bp14s_di" bpmnElement="SequenceFlow_07bp14s">
+ <di:waypoint xsi:type="dc:Point" x="492" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="580" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="398" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oz5grh_di" bpmnElement="SequenceFlow_1oz5grh">
+ <di:waypoint xsi:type="dc:Point" x="630" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="730" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="674" y="398" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06e7qr6_di" bpmnElement="SequenceFlow_06e7qr6">
+ <di:waypoint xsi:type="dc:Point" x="830" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="951" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890.5" y="398" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0koi1ia_di" bpmnElement="SequenceFlow_0koi1ia">
+ <di:waypoint xsi:type="dc:Point" x="1001" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="398" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19glon5_di" bpmnElement="SequenceFlow_19glon5">
+ <di:waypoint xsi:type="dc:Point" x="605" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="605" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="1093" y="603" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="518" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q83qn9_di" bpmnElement="SequenceFlow_1q83qn9">
+ <di:waypoint xsi:type="dc:Point" x="976" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="1093" y="603" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="978" y="518" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
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
new file mode 100644
index 0000000000..a46d8d4de2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
@@ -0,0 +1,648 @@
+<?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:process id="DoUpdateE2EServiceInstance" name="DoUpdateE2EServiceInstance" isExecutable="true">
+ <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04xlw7s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoUpdateE2EServiceInstance()
+dcsi.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_09laxun" name="PreProcess for Add Resources" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_115mdln</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0yztz2p</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstance()
+csi.preProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_0ag30bf" name="PostProcess for Add Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1wwjugw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_177wo8z</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstance()
+csi.postProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="StartEvent_StartResource" name="StartAddResources">
+ <bpmn2:outgoing>SequenceFlow_115mdln</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartAddResources" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_115mdln" sourceRef="StartEvent_StartResource" targetRef="Task_09laxun" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0yztz2p" sourceRef="Task_09laxun" targetRef="ExclusiveGateway_06gj84t" />
+ <bpmn2:scriptTask id="ScriptTask_1xxvnst" name="PreProcess for Delete Resources" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qn0865</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1s799cp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstance()
+csi.preProcessForDeleteResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_00wgfrc" name="PostProcess for Delete Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0w4t4ao</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uu6uiu</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstance()
+csi.postProcessForDeleteResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0h6d9jb" name="StartDeleteResources">
+ <bpmn2:outgoing>SequenceFlow_1qn0865</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartDeleteResources" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qn0865" sourceRef="IntermediateCatchEvent_0h6d9jb" targetRef="ScriptTask_1xxvnst" />
+ <bpmn2:scriptTask id="ScriptTask_0acnvkp" name="Prepare Resource Oper Status" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_04xlw7s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0r6c0ci</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoUpdateE2EServiceInstance()
+ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_17u9q9u" name="Init Resource Oper Status">
+ <bpmn2: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_initResOperStatusRequest}</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>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0r6c0ci</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1muxopq</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0r6c0ci" sourceRef="ScriptTask_0acnvkp" targetRef="ServiceTask_17u9q9u" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1muxopq" sourceRef="ServiceTask_17u9q9u" targetRef="IntermediateThrowEvent_09ur9ds" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0vneaao" name="GoTo StartDeleteResources">
+ <bpmn2:incoming>SequenceFlow_177wo8z</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartDeleteResources" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:callActivity id="CallActivity_1nm9zq7" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
+ <bpmn2:extensionElements>
+ <camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
+ <camunda:in source="serviceInstanceId" target="GENPS_serviceInstanceId" />
+ <camunda:in source="serviceType" target="GENPS_serviceType" />
+ <camunda:in sourceExpression="service-instance" target="GENPS_type" />
+ <camunda:in source="serviceInstanceData" target="GENPS_payload" />
+ <camunda:out source="GENPS_SuccessIndicator" target="GENPS_SuccessIndicator" />
+ <camunda:in source="msoRequestId" target="GENPS_requesId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="GENPS_serviceResourceVersion" target="GENPS_serviceResourceVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1kx5ke9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0f76thv</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0xtabf8" name="Post Process AAI PUT" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0f76thv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0x0mhlj</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def ddsi = new DoUpdateE2EServiceInstance()
+ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0a9bdjw" name="UpdateAAI">
+ <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_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>
+ <bpmn2:outgoing>SequenceFlow_07aa121</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstance()
+csi.postConfigRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0z04o3s" name="FinishProcess">
+ <bpmn2:outgoing>SequenceFlow_0ku36oy</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="EndEvent_0exzmfn">
+ <bpmn2:incoming>SequenceFlow_07aa121</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_07aa121" sourceRef="ScriptTask_19v8l1w" targetRef="EndEvent_0exzmfn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ku36oy" sourceRef="IntermediateCatchEvent_0z04o3s" targetRef="ScriptTask_19v8l1w" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_06lo96a" name="GoTo UpdateAAI">
+ <bpmn2:incoming>SequenceFlow_1uu6uiu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateAAI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0hucdtk" name="GoTo FinishProcess">
+ <bpmn2:incoming>SequenceFlow_0x0mhlj</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0x0mhlj" sourceRef="ScriptTask_0xtabf8" targetRef="IntermediateThrowEvent_0hucdtk" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_09ur9ds" name="GoTo StartAddResources">
+ <bpmn2:incoming>SequenceFlow_1muxopq</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartAddResources" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uu6uiu" sourceRef="ScriptTask_00wgfrc" targetRef="IntermediateThrowEvent_06lo96a" />
+ <bpmn2:subProcess id="SubProcess_0jo0nms" name="Sub-process for Application Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_06768u3">
+ <bpmn2:outgoing>SequenceFlow_05j3sat</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_014jyvb">
+ <bpmn2:incoming>SequenceFlow_02znk15</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_1awrp72" name="Pre Process Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_05j3sat</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19ly8h7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoUpdateE2EServiceInstance()
+dcsi.preProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0vc9jgo" name="Post Process Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19ly8h7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_02znk15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoUpdateE2EServiceInstance()
+dcsi.postProcessRollback(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_05j3sat" sourceRef="StartEvent_06768u3" targetRef="ScriptTask_1awrp72" />
+ <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:outgoing>SequenceFlow_1kx5ke9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoUpdateE2EServiceInstance()
+dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kx5ke9" sourceRef="ScriptTask_0sis7k0" targetRef="CallActivity_1nm9zq7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04xlw7s" sourceRef="preProcessRequest_ScriptTask" targetRef="ScriptTask_0acnvkp" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_06gj84t" name="HasResourcetoAdd?" default="SequenceFlow_01po987">
+ <bpmn2:incoming>SequenceFlow_0yztz2p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ttlte0</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_01po987</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ttlte0" name="Yes" sourceRef="ExclusiveGateway_06gj84t" targetRef="CallActivity_07pl1uw">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("hasResourcetoAdd") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0xny7on" name="GoTo StartDeleteResources">
+ <bpmn2:incoming>SequenceFlow_01po987</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartDeleteResources" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_01po987" name="No" sourceRef="ExclusiveGateway_06gj84t" targetRef="IntermediateThrowEvent_0xny7on" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0y1ii4i" name="GoTo UpdateAAI">
+ <bpmn2:incoming>SequenceFlow_070o30v</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateAAI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_177wo8z" sourceRef="Task_0ag30bf" targetRef="IntermediateThrowEvent_0vneaao" />
+ <bpmn2:callActivity id="CallActivity_11obqi0" name="Call DoDeleteResources" calledElement="DoDeleteResourcesV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="deleteResourceList" target="deleteResourceList" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="serviceDecomposition_Original" target="serviceDecomposition" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ur34hv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w4t4ao</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w4t4ao" sourceRef="CallActivity_11obqi0" targetRef="ScriptTask_00wgfrc" />
+ <bpmn2:callActivity id="CallActivity_07pl1uw" name="Call DoCreateResources" calledElement="DoCreateResourcesV3">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceDescription" target="nsServiceDescription" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="addResourceList" target="addResourceList" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceDecomposition_Target" target="serviceDecomposition" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0ttlte0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wwjugw</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wwjugw" sourceRef="CallActivity_07pl1uw" targetRef="Task_0ag30bf" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1fcnq0g" name="HasResourcetoDelete?" default="SequenceFlow_070o30v">
+ <bpmn2:incoming>SequenceFlow_1s799cp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ur34hv</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_070o30v</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1s799cp" sourceRef="ScriptTask_1xxvnst" targetRef="ExclusiveGateway_1fcnq0g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0ur34hv" name="Yes" sourceRef="ExclusiveGateway_1fcnq0g" targetRef="CallActivity_11obqi0">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("hasResourcetoDelete") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_070o30v" sourceRef="ExclusiveGateway_1fcnq0g" targetRef="IntermediateThrowEvent_0y1ii4i" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateE2EServiceInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
+ <dc:Bounds x="74" y="622" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="68" y="663" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="293" y="600" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="110" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="640" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="156.5" y="625" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1azssf7_di" bpmnElement="Task_09laxun">
+ <dc:Bounds x="293" y="828" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1fj89ew_di" bpmnElement="Task_0ag30bf">
+ <dc:Bounds x="1229" y="828" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jks7by_di" bpmnElement="StartEvent_StartResource">
+ <dc:Bounds x="74" y="850" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="50" y="895" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_115mdln_di" bpmnElement="SequenceFlow_115mdln">
+ <di:waypoint xsi:type="dc:Point" x="110" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="868" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="156.5" y="847" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yztz2p_di" bpmnElement="SequenceFlow_0yztz2p">
+ <di:waypoint xsi:type="dc:Point" x="393" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="868" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="446.5" y="847" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1xxvnst_di" bpmnElement="ScriptTask_1xxvnst">
+ <dc:Bounds x="293" y="1081" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00wgfrc_di" bpmnElement="ScriptTask_00wgfrc">
+ <dc:Bounds x="1240" y="1081" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0h6d9jb_di" bpmnElement="IntermediateCatchEvent_0h6d9jb">
+ <dc:Bounds x="74" y="1103" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="50" y="1143" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qn0865_di" bpmnElement="SequenceFlow_1qn0865">
+ <di:waypoint xsi:type="dc:Point" x="110" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="202" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="1121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="1115" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0acnvkp_di" bpmnElement="ScriptTask_0acnvkp">
+ <dc:Bounds x="589" y="600" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_17u9q9u_di" bpmnElement="ServiceTask_17u9q9u">
+ <dc:Bounds x="872" y="600" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r6c0ci_di" bpmnElement="SequenceFlow_0r6c0ci">
+ <di:waypoint xsi:type="dc:Point" x="689" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="872" y="640" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="744" y="634" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1muxopq_di" bpmnElement="SequenceFlow_1muxopq">
+ <di:waypoint xsi:type="dc:Point" x="972" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="1762" y="640" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1322" y="619" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0vneaao_di" bpmnElement="IntermediateThrowEvent_0vneaao">
+ <dc:Bounds x="1762" y="850" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1738" y="890" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1nm9zq7_di" bpmnElement="CallActivity_1nm9zq7">
+ <dc:Bounds x="1229" y="1333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xtabf8_di" bpmnElement="ScriptTask_0xtabf8">
+ <dc:Bounds x="1473" y="1333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0a9bdjw_di" bpmnElement="IntermediateCatchEvent_0a9bdjw">
+ <dc:Bounds x="74" y="1355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="69" y="1391" width="52" height="12" />
+ </bpmndi:BPMNLabel>
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="212" y="1367" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f76thv_di" bpmnElement="SequenceFlow_0f76thv">
+ <di:waypoint xsi:type="dc:Point" x="1329" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="1473" y="1373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1356" y="1352" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19v8l1w_di" bpmnElement="ScriptTask_19v8l1w">
+ <dc:Bounds x="858" y="1579" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0z04o3s_di" bpmnElement="IntermediateCatchEvent_0z04o3s">
+ <dc:Bounds x="74" y="1601" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="57" y="1641" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0exzmfn_di" bpmnElement="EndEvent_0exzmfn">
+ <dc:Bounds x="1772" y="1601" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1700" y="1641" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_07aa121_di" bpmnElement="SequenceFlow_07aa121">
+ <di:waypoint xsi:type="dc:Point" x="958" y="1619" />
+ <di:waypoint xsi:type="dc:Point" x="1772" y="1619" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1320" y="1598" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ku36oy_di" bpmnElement="SequenceFlow_0ku36oy">
+ <di:waypoint xsi:type="dc:Point" x="110" y="1619" />
+ <di:waypoint xsi:type="dc:Point" x="858" y="1619" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="439" y="1598" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_06lo96a_di" bpmnElement="IntermediateThrowEvent_06lo96a">
+ <dc:Bounds x="1762" y="1103" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1750" y="1143" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0hucdtk_di" bpmnElement="IntermediateThrowEvent_0hucdtk">
+ <dc:Bounds x="1762" y="1355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1756" y="1395" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x0mhlj_di" bpmnElement="SequenceFlow_0x0mhlj">
+ <di:waypoint xsi:type="dc:Point" x="1573" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="1762" y="1373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1622.5" y="1352" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_09ur9ds_di" bpmnElement="IntermediateThrowEvent_09ur9ds">
+ <dc:Bounds x="1762" y="622" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1738" y="663" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uu6uiu_di" bpmnElement="SequenceFlow_1uu6uiu">
+ <di:waypoint xsi:type="dc:Point" x="1340" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="1762" y="1121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1506" y="1100" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0jo0nms_di" bpmnElement="SubProcess_0jo0nms" isExpanded="true">
+ <dc:Bounds x="236" y="1818" width="1428" height="210" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_06768u3_di" bpmnElement="StartEvent_06768u3">
+ <dc:Bounds x="266" y="1895" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="194" y="1936" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_014jyvb_di" bpmnElement="EndEvent_014jyvb">
+ <dc:Bounds x="1581" y="1895" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1509" y="1936" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1awrp72_di" bpmnElement="ScriptTask_1awrp72">
+ <dc:Bounds x="557" y="1873" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0vc9jgo_di" bpmnElement="ScriptTask_0vc9jgo">
+ <dc:Bounds x="1248" y="1873" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05j3sat_di" bpmnElement="SequenceFlow_05j3sat">
+ <di:waypoint xsi:type="dc:Point" x="302" y="1913" />
+ <di:waypoint xsi:type="dc:Point" x="557" y="1913" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="385" y="1892" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02znk15_di" bpmnElement="SequenceFlow_02znk15">
+ <di:waypoint xsi:type="dc:Point" x="1348" y="1913" />
+ <di:waypoint xsi:type="dc:Point" x="1581" y="1913" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1376" y="1898" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ly8h7_di" bpmnElement="SequenceFlow_19ly8h7">
+ <di:waypoint xsi:type="dc:Point" x="657" y="1913" />
+ <di:waypoint xsi:type="dc:Point" x="1248" y="1913" />
+ <bpmndi:BPMNLabel>
+ <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>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kx5ke9_di" bpmnElement="SequenceFlow_1kx5ke9">
+ <di:waypoint xsi:type="dc:Point" x="1078" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="1373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1108.5" y="1352" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04xlw7s_di" bpmnElement="SequenceFlow_04xlw7s">
+ <di:waypoint xsi:type="dc:Point" x="393" y="640" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="640" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="491" y="619" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06gj84t_di" bpmnElement="ExclusiveGateway_06gj84t" isMarkerVisible="true">
+ <dc:Bounds x="590" y="843" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="815" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ttlte0_di" bpmnElement="SequenceFlow_0ttlte0">
+ <di:waypoint xsi:type="dc:Point" x="640" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="756" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="756" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="858" y="868" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="750" y="845" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0xny7on_di" bpmnElement="IntermediateThrowEvent_0xny7on">
+ <dc:Bounds x="597" y="955" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="995" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01po987_di" bpmnElement="SequenceFlow_01po987">
+ <di:waypoint xsi:type="dc:Point" x="615" y="893" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="955" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="623" y="918" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0y1ii4i_di" bpmnElement="IntermediateThrowEvent_0y1ii4i">
+ <dc:Bounds x="597" y="1215" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="1255" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_177wo8z_di" bpmnElement="SequenceFlow_177wo8z">
+ <di:waypoint xsi:type="dc:Point" x="1329" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="1762" y="868" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1545.5" y="847" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_11obqi0_di" bpmnElement="CallActivity_11obqi0">
+ <dc:Bounds x="872" y="1081" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w4t4ao_di" bpmnElement="SequenceFlow_0w4t4ao">
+ <di:waypoint xsi:type="dc:Point" x="972" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="1240" y="1121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1106" y="1100" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_07pl1uw_di" bpmnElement="CallActivity_07pl1uw">
+ <dc:Bounds x="858" y="828" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wwjugw_di" bpmnElement="SequenceFlow_1wwjugw">
+ <di:waypoint xsi:type="dc:Point" x="958" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="1101" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="1101" y="868" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="868" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1116" y="862" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1fcnq0g_di" bpmnElement="ExclusiveGateway_1fcnq0g" isMarkerVisible="true">
+ <dc:Bounds x="589.8479623824451" y="1096.0329153605016" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="572" y="1062" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s799cp_di" bpmnElement="SequenceFlow_1s799cp">
+ <di:waypoint xsi:type="dc:Point" x="393" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="1121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="491.5" y="1100" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ur34hv_di" bpmnElement="SequenceFlow_0ur34hv">
+ <di:waypoint xsi:type="dc:Point" x="640" y="1121" />
+ <di:waypoint xsi:type="dc:Point" x="872" y="1121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="746.9754098360655" y="1100" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_070o30v_di" bpmnElement="SequenceFlow_070o30v">
+ <di:waypoint xsi:type="dc:Point" x="615" y="1146" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="1182" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="1182" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="1215" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="630" y="1176" 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/DoUpdateE2EServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..1589633e59
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
@@ -0,0 +1,799 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoUpdateE2EServiceInstanceRollback" name="DoUpdateE2EServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSIRollback_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_01l4ssl</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for Errors" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Handle Errors" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.processRollbackException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="ExclusiveGateway_19tbjgn" />
+ <bpmn2:scriptTask id="PostProcess_ScriptTask" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1rzlaoy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0a83f6m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01l4ssl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01l4ssl" sourceRef="PostProcess_ScriptTask" targetRef="EndEvent_3" />
+ <bpmn2:subProcess id="SubProcess_11bi8mc" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_1gxe17c">
+ <bpmn2:outgoing>SequenceFlow_1ch4xrf</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition errorRef="Error_1" />
+ </bpmn2:startEvent>
+ <bpmn2:scriptTask id="ScriptTask_15yddb0" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ch4xrf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pjk2ff</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateE2EServiceInstanceRollback()
+rbk.processRollbackJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_12e3h6k">
+ <bpmn2:incoming>SequenceFlow_1pjk2ff</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ch4xrf" name="" sourceRef="StartEvent_1gxe17c" targetRef="ScriptTask_15yddb0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pjk2ff" name="" sourceRef="ScriptTask_15yddb0" targetRef="EndEvent_12e3h6k" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_19tbjgn" name="skip Rollback" default="SequenceFlow_06aasqh">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rzlaoy</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_06aasqh</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rzlaoy" name="yes" sourceRef="ExclusiveGateway_19tbjgn" targetRef="PostProcess_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBack Deleted Resources?" default="SequenceFlow_055b52t">
+ <bpmn2:documentation>rollback Deleted Resources</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0drjj7b</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_055b52t</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="Rollback Added Resources?" default="SequenceFlow_1uw2p9a">
+ <bpmn2:incoming>SequenceFlow_06aasqh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1uw2p9a</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_11fnnkb</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="ExclusiveGateway_0ii31dq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_11fnnkb" name="yes" sourceRef="ExclusiveGateway_09wkav2" targetRef="IntermediateThrowEvent_11l0okn">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAdded" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_06aasqh" name="no" sourceRef="ExclusiveGateway_19tbjgn" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:callActivity id="CallActivity_05jnyuq" name="Call DoDeleteResources" calledElement="DoDeleteResources">
+ <bpmn2:extensionElements>
+ <camunda:in source="nsServiceName" target="nsServiceName" />
+ <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="resourceUUID" target="resourceUUID" />
+ <camunda:in source="resourceParameters" target="resourceParameters" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1fih4h0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0pwixhh</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0pwixhh" sourceRef="CallActivity_05jnyuq" targetRef="ScriptTask_0ngehrz" />
+ <bpmn2:scriptTask id="ScriptTask_1i1ova8" name="PreProcess for Add Resources" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_06xv7b2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0b73i9r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstanceRollback()
+csi.preProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0ngehrz" name="PostProcess for Add Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0pwixhh</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08p4pkv</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstanceRollback()
+csi.postProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_01beerv" name="PreProcess for Delete Resources" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1g4qm2l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fih4h0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstanceRollback()
+csi.preProcessForDeleteResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0l7jjb1" name="Call DoCreateResources" calledElement="DoCreateResources">
+ <bpmn2:extensionElements>
+ <camunda:in source="nsServiceName" target="nsServiceName" />
+ <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="resourceUUID" target="resourceUUID" />
+ <camunda:in source="resourceParameters" target="resourceParameters" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0b73i9r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q9ws1s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1afo620" name="PostProcess for Add Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0q9ws1s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bp5oce</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DoUpdateE2EServiceInstanceRollback()
+csi.postProcessForAddResource(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0ybxh3b" name="RollBackAAI?" default="SequenceFlow_0a83f6m">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_055b52t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a83f6m</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0zijz16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0drjj7b" name="yes" sourceRef="ExclusiveGateway_0ii31dq" targetRef="IntermediateThrowEvent_14ed07u">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackDeleted" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05uesi2" name="StartAddResources">
+ <bpmn2:outgoing>SequenceFlow_06xv7b2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartAddResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1qn9srt" name="StartDeleteResources">
+ <bpmn2:outgoing>SequenceFlow_1g4qm2l</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartDeleteResources" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_11l0okn" name="GoTo StartDeleteResources">
+ <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartDeleteResources" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_14ed07u" name="GoTo StartAddResources">
+ <bpmn2:incoming>SequenceFlow_0drjj7b</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartAddResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0a83f6m" name="no" sourceRef="ExclusiveGateway_0ybxh3b" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1fih4h0" sourceRef="ScriptTask_01beerv" targetRef="CallActivity_05jnyuq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1g4qm2l" sourceRef="IntermediateCatchEvent_1qn9srt" targetRef="ScriptTask_01beerv" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06xv7b2" sourceRef="IntermediateCatchEvent_05uesi2" targetRef="ScriptTask_1i1ova8" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0b73i9r" sourceRef="ScriptTask_1i1ova8" targetRef="CallActivity_0l7jjb1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0q9ws1s" sourceRef="CallActivity_0l7jjb1" targetRef="ScriptTask_1afo620" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0546q5i" name="UpdateAAI">
+ <bpmn2:outgoing>SequenceFlow_1a65s3k</bpmn2:outgoing>
+ <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:outgoing>SequenceFlow_1lppnhy</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DoUpdateE2EServiceInstanceRollback()
+dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0zs5y0x" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
+ <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_1lppnhy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0kbisn8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1p96syr" name="Post Process AAI PUT" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0kbisn8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1azhgda</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+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_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">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_08p4pkv</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cbnwwi</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_161uzhj</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08p4pkv" sourceRef="ScriptTask_0ngehrz" targetRef="ExclusiveGateway_1k16vgh" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0x32fw8" name="GoTo UpdateAAI">
+ <bpmn2:incoming>SequenceFlow_0cbnwwi</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateAAI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cbnwwi" name="yes" sourceRef="ExclusiveGateway_1k16vgh" targetRef="IntermediateThrowEvent_0x32fw8">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAAI" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_1c3q8hc" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_161uzhj</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13r4lij</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_161uzhj" sourceRef="ExclusiveGateway_1k16vgh" targetRef="ScriptTask_1c3q8hc" />
+ <bpmn2:endEvent id="EndEvent_0knjkkx">
+ <bpmn2:incoming>SequenceFlow_13r4lij</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13r4lij" sourceRef="ScriptTask_1c3q8hc" targetRef="EndEvent_0knjkkx" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0g7wcmb" name="RollBackAAI?" default="SequenceFlow_1isdxh1">
+ <bpmn2:documentation>rollback AAI</bpmn2:documentation>
+ <bpmn2:incoming>SequenceFlow_1bp5oce</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bkvqao</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1isdxh1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0q76lxg" name="GoTo UpdateAAI">
+ <bpmn2:incoming>SequenceFlow_0bkvqao</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateAAI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1y4us3g" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1isdxh1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0a9xori</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_0yzh2qs">
+ <bpmn2:incoming>SequenceFlow_0a9xori</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bkvqao" name="yes" sourceRef="ExclusiveGateway_0g7wcmb" targetRef="IntermediateThrowEvent_0q76lxg">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAAI" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1isdxh1" sourceRef="ExclusiveGateway_0g7wcmb" targetRef="ScriptTask_1y4us3g" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0a9xori" sourceRef="ScriptTask_1y4us3g" targetRef="EndEvent_0yzh2qs" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1et42wh" name="GoTo UpdateAAI">
+ <bpmn2:incoming>SequenceFlow_0zijz16</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="UpdateAAI" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0zijz16" name="yes" sourceRef="ExclusiveGateway_0ybxh3b" targetRef="IntermediateThrowEvent_1et42wh">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAAI" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1bp5oce" sourceRef="ScriptTask_1afo620" targetRef="ExclusiveGateway_0g7wcmb" />
+ <bpmn2:scriptTask id="ScriptTask_17k4l6y" name="Post Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1azhgda</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n6foyw</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def rbk = new DoCreateE2EServiceInstanceRollback()
+rbk.postProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_193e9tt">
+ <bpmn2:incoming>SequenceFlow_1n6foyw</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateE2EServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="234" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="234" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="211" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="636" y="-160" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="609" y="-119" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="122" y="981" width="466" height="156" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="190" y="1047" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="163" y="1088" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="483" y="1047" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="456" y="1088" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">
+ <di:waypoint xsi:type="dc:Point" x="226" y="1065" />
+ <di:waypoint xsi:type="dc:Point" x="294" y="1065" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="216" y="1050" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="334" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="391" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="342.5" y="82" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="294" y="1025" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="394" y="1065" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="1065" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="394" y="1050" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask">
+ <dc:Bounds x="604" y="-62" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl">
+ <di:waypoint xsi:type="dc:Point" x="654" y="-62" />
+ <di:waypoint xsi:type="dc:Point" x="654" y="-89" />
+ <di:waypoint xsi:type="dc:Point" x="654" y="-89" />
+ <di:waypoint xsi:type="dc:Point" x="654" y="-124" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="624" y="-89" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_11bi8mc_di" bpmnElement="SubProcess_11bi8mc" isExpanded="true">
+ <dc:Bounds x="612" y="982" width="463" height="152" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1gxe17c_di" bpmnElement="StartEvent_1gxe17c">
+ <dc:Bounds x="647" y="1034" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="620" y="1075" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15yddb0_di" bpmnElement="ScriptTask_15yddb0">
+ <dc:Bounds x="755" y="1012" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_12e3h6k_di" bpmnElement="EndEvent_12e3h6k">
+ <dc:Bounds x="905" y="1034" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="878" y="1075" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ch4xrf_di" bpmnElement="SequenceFlow_1ch4xrf">
+ <di:waypoint xsi:type="dc:Point" x="683" y="1052" />
+ <di:waypoint xsi:type="dc:Point" x="755" y="1052" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="663" y="1052" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pjk2ff_di" bpmnElement="SequenceFlow_1pjk2ff">
+ <di:waypoint xsi:type="dc:Point" x="855" y="1052" />
+ <di:waypoint xsi:type="dc:Point" x="905" y="1052" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="1052" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true">
+ <dc:Bounds x="391" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="383" y="54" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy">
+ <di:waypoint xsi:type="dc:Point" x="416" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="416" y="-22" />
+ <di:waypoint xsi:type="dc:Point" x="604" y="-22" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="463.0056179775281" y="-39" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
+ <dc:Bounds x="687" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="668" y="39" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="520" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="507" y="38" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="570" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="592.125" y="107.5" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="545" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="218" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="510" y="135.20000000000002" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh">
+ <di:waypoint xsi:type="dc:Point" x="441" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="460.5" y="104" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_05jnyuq_di" bpmnElement="CallActivity_05jnyuq">
+ <dc:Bounds x="417" y="345" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pwixhh_di" bpmnElement="SequenceFlow_0pwixhh">
+ <di:waypoint xsi:type="dc:Point" x="517" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="594" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="511" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1i1ova8_di" bpmnElement="ScriptTask_1i1ova8">
+ <dc:Bounds x="230" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0ngehrz_di" bpmnElement="ScriptTask_0ngehrz">
+ <dc:Bounds x="594" y="345" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01beerv_di" bpmnElement="ScriptTask_01beerv">
+ <dc:Bounds x="230" y="345" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0l7jjb1_di" bpmnElement="CallActivity_0l7jjb1">
+ <dc:Bounds x="417" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1afo620_di" bpmnElement="ScriptTask_1afo620">
+ <dc:Bounds x="594" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ybxh3b_di" bpmnElement="ExclusiveGateway_0ybxh3b" isMarkerVisible="true">
+ <dc:Bounds x="864" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="894" y="44" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0drjj7b_di" bpmnElement="SequenceFlow_0drjj7b">
+ <di:waypoint xsi:type="dc:Point" x="712" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="712" y="218" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="141.6" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05uesi2_di" bpmnElement="IntermediateCatchEvent_05uesi2">
+ <dc:Bounds x="159" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="135" y="600" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1qn9srt_di" bpmnElement="IntermediateCatchEvent_1qn9srt">
+ <dc:Bounds x="159" y="367" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="135" y="407" width="86" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11l0okn_di" bpmnElement="IntermediateThrowEvent_11l0okn">
+ <dc:Bounds x="527" y="218" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="257" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_14ed07u_di" bpmnElement="IntermediateThrowEvent_14ed07u">
+ <dc:Bounds x="694" y="218" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="670" y="262" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a83f6m_di" bpmnElement="SequenceFlow_0a83f6m">
+ <di:waypoint xsi:type="dc:Point" x="889" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="889" y="-22" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="-22" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="837" y="19" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fih4h0_di" bpmnElement="SequenceFlow_1fih4h0">
+ <di:waypoint xsi:type="dc:Point" x="330" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="417" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1g4qm2l_di" bpmnElement="SequenceFlow_1g4qm2l">
+ <di:waypoint xsi:type="dc:Point" x="195" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="230" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06xv7b2_di" bpmnElement="SequenceFlow_06xv7b2">
+ <di:waypoint xsi:type="dc:Point" x="195" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="230" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="552" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b73i9r_di" bpmnElement="SequenceFlow_0b73i9r">
+ <di:waypoint xsi:type="dc:Point" x="330" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="363" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="363" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="417" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="567" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q9ws1s_di" bpmnElement="SequenceFlow_0q9ws1s">
+ <di:waypoint xsi:type="dc:Point" x="517" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="594" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="515" y="567" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0546q5i_di" bpmnElement="IntermediateCatchEvent_0546q5i">
+ <dc:Bounds x="156" y="765" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="801" width="52" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0gj4dj5_di" bpmnElement="ScriptTask_0gj4dj5">
+ <dc:Bounds x="687" y="743" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0zs5y0x_di" bpmnElement="CallActivity_0zs5y0x">
+ <dc:Bounds x="841" y="743" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1p96syr_di" bpmnElement="ScriptTask_1p96syr">
+ <dc:Bounds x="1014" y="743" width="100" height="80" />
+ </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" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="168" y="762" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lppnhy_di" bpmnElement="SequenceFlow_1lppnhy">
+ <di:waypoint xsi:type="dc:Point" x="787" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="783" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="769" y="762" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kbisn8_di" bpmnElement="SequenceFlow_0kbisn8">
+ <di:waypoint xsi:type="dc:Point" x="941" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="978" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="978" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="1014" y="783" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="948" y="777" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1k16vgh_di" bpmnElement="ExclusiveGateway_1k16vgh" isMarkerVisible="true">
+ <dc:Bounds x="778" y="360" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="358" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08p4pkv_di" bpmnElement="SequenceFlow_08p4pkv">
+ <di:waypoint xsi:type="dc:Point" x="694" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="778" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="691" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0x32fw8_di" bpmnElement="IntermediateThrowEvent_0x32fw8">
+ <dc:Bounds x="785" y="454" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="762" y="495" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cbnwwi_di" bpmnElement="SequenceFlow_0cbnwwi">
+ <di:waypoint xsi:type="dc:Point" x="803" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="454" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="426" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1c3q8hc_di" bpmnElement="ScriptTask_1c3q8hc">
+ <dc:Bounds x="879" y="345" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_161uzhj_di" bpmnElement="SequenceFlow_161uzhj">
+ <di:waypoint xsi:type="dc:Point" x="828" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0knjkkx_di" bpmnElement="EndEvent_0knjkkx">
+ <dc:Bounds x="1040" y="367" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1013" y="407" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13r4lij_di" bpmnElement="SequenceFlow_13r4lij">
+ <di:waypoint xsi:type="dc:Point" x="979" y="385" />
+ <di:waypoint xsi:type="dc:Point" x="1040" y="385" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="965" y="364" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0g7wcmb_di" bpmnElement="ExclusiveGateway_0g7wcmb" isMarkerVisible="true">
+ <dc:Bounds x="778" y="548" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="546" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0q76lxg_di" bpmnElement="IntermediateThrowEvent_0q76lxg">
+ <dc:Bounds x="785" y="647" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="762" y="693" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1y4us3g_di" bpmnElement="ScriptTask_1y4us3g">
+ <dc:Bounds x="879" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0yzh2qs_di" bpmnElement="EndEvent_0yzh2qs">
+ <dc:Bounds x="1040" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1013" y="595" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bkvqao_di" bpmnElement="SequenceFlow_0bkvqao">
+ <di:waypoint xsi:type="dc:Point" x="803" y="598" />
+ <di:waypoint xsi:type="dc:Point" x="803" y="647" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="617" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1isdxh1_di" bpmnElement="SequenceFlow_1isdxh1">
+ <di:waypoint xsi:type="dc:Point" x="828" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="552" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a9xori_di" bpmnElement="SequenceFlow_0a9xori">
+ <di:waypoint xsi:type="dc:Point" x="979" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="1040" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="965" y="552" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1et42wh_di" bpmnElement="IntermediateThrowEvent_1et42wh">
+ <dc:Bounds x="873" y="218" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="269" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zijz16_di" bpmnElement="SequenceFlow_0zijz16">
+ <di:waypoint xsi:type="dc:Point" x="889" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="218" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="861.4067820523877" y="137.3057489950117" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bp5oce_di" bpmnElement="SequenceFlow_1bp5oce">
+ <di:waypoint xsi:type="dc:Point" x="694" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="778" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="691" y="552" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17k4l6y_di" bpmnElement="ScriptTask_17k4l6y">
+ <dc:Bounds x="1171" y="743" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_193e9tt_di" bpmnElement="EndEvent_193e9tt">
+ <dc:Bounds x="1327" y="765" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1300" y="805" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n6foyw_di" bpmnElement="SequenceFlow_1n6foyw">
+ <di:waypoint xsi:type="dc:Point" x="1271" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="1327" y="783" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1254" y="762" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1azhgda_di" bpmnElement="SequenceFlow_1azhgda">
+ <di:waypoint xsi:type="dc:Point" x="1114" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="1171" y="783" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1097.5" y="762" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_055b52t_di" bpmnElement="SequenceFlow_055b52t">
+ <di:waypoint xsi:type="dc:Point" x="737" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="864" y="97" />
+ <bpmndi:BPMNLabel>
+ <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
new file mode 100644
index 0000000000..306b05cea1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
@@ -0,0 +1,829 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoUpdateNetworkInstance" name="DoUpdateNetworkInstance" isExecutable="true">
+ <bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" />
+ <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
+ <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTReQuery1NetworkID_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent" />
+ <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+ <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC ChangeAssign Adapter V1 Sub-process" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNETI_changeAssignSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:out source="sdncAdapterResponse" target="UPDNETI_changeAssignSDNCResponse" />
+ <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_sdncReturnCode" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="WorkflowException" target="UPDNETI_WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ <camunda:in variables="all" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask" />
+ <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="EndEvent_3" />
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception" triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_053re4q</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2" />
+ <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ScriptTask_1gedbow" />
+ <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">
+ <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isPONR") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1dcb5p2" />
+ <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">
+ <bpmn2:incoming>SequenceFlow_0nrc66n</bpmn2:incoming>
+ <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>
+ <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="InclusiveGateway_6" />
+ <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">
+ <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="InclusiveGateway_6" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_04rdjfi</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_6">
+ <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
+ <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0srdlf3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="ScriptTask_1p6n2yy" />
+ <bpmn2:scriptTask id="ScriptTask_1p6n2yy" name="Prepare RollbackData" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qr4es6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_1kid5y0" name="DoUpdate&#10;NetworkInstanceRollback&#10;" calledElement="DoCreateNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="rollbackData" target="rollbackData" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="workflowException" target="workflowException" />
+ <camunda:in source="SavedWorkflowException1" target="SavedWorkflowException1" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qr4es6</bpmn2:incoming>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_0voqz6r" name="Post Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ze5k6c</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04rdjfi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qr4es6" sourceRef="ScriptTask_1p6n2yy" targetRef="CallActivity_1kid5y0" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04rdjfi" sourceRef="ScriptTask_0voqz6r" targetRef="EndEvent_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kjh92x" name="is &#39;1702&#39; SNDC Call?">
+ <bpmn2:outgoing>SequenceFlow_0nrc66n</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0srdlf3</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0nrc66n" name="No" sourceRef="ExclusiveGateway_1kjh92x" targetRef="sdncOk_ExclusiveGateway" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0srdlf3" name="Yes" sourceRef="ExclusiveGateway_1kjh92x" targetRef="InclusiveGateway_6">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_1gedbow" name="Set Exception Flag" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_053re4q</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.setExceptionFlag(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_053re4q" sourceRef="ScriptTask_1gedbow" targetRef="isRollbackOn_Network_ExclusiveGateway" />
+ <bpmn2:inclusiveGateway id="ExclusiveGateway_1dcb5p2">
+ <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ze5k6c</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ze5k6c" sourceRef="ExclusiveGateway_1dcb5p2" targetRef="ScriptTask_0voqz6r" />
+ <bpmn2:textAnnotation id="TextAnnotation_0qx19b9"> <bpmn2:text>Note: Rollback is not needed for UpdateNetwork,</bpmn2:text>
+</bpmn2:textAnnotation>
+ <bpmn2:association id="Association_10dk4x3" sourceRef="CallActivity_1kid5y0" targetRef="TextAnnotation_0qx19b9" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="callRESTReQuery2NetworkID_ScriptTask" name="Call REST ReQuery2 Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" />
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="callGetServiceInstance" />
+ <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+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: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:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.validateUpdateNetworkResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask" />
+ <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}/${UPDNETI_networkId}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">PUT</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNETI_networkReturnCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNETI_updateNetworkResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callUpdateNetwork_ServiceTask" targetRef="validateUpdatePONetwork_ScriptTask" />
+ <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.prepareUpdateNetworkRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callUpdateNetwork_ServiceTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTReQuery1NetworkID_ScriptTask" name="Call REST ReQuery1 Network Id in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callRESTReQuery1NetworkID_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" />
+ <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateNetworkInstance">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent">
+ <dc:Bounds x="286" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="279" y="226" width="49" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="472" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
+ <di:waypoint xsi:type="dc:Point" x="322" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="472" y="203" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="188" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask">
+ <dc:Bounds x="1343" y="1311" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask">
+ <dc:Bounds x="1342" y="1176" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds x="1519" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds x="-153" y="594" width="1288" height="701" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="-103" y="1160" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-109" y="1201" width="50" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="1544" y="521" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1535" y="577" width="67" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1594" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="1682" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1600" y="546.8622891951518" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_336">
+ <di:waypoint xsi:type="dc:Point" x="1544" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="576" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1526" y="546" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="743" y="1390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds x="1682" y="528" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1663" y="569" width="74" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
+ <dc:Bounds x="1519" y="242" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">
+ <di:waypoint xsi:type="dc:Point" x="1569" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="1569" y="242" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1584" y="211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+ <di:waypoint xsi:type="dc:Point" x="1569" y="322" />
+ <di:waypoint xsi:type="dc:Point" x="1569" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1584" y="347.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61">
+ <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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
+ <di:waypoint xsi:type="dc:Point" x="-67" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="-40" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="-11" y="1178" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-53" y="1163" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds x="1519" y="373" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+ <di:waypoint xsi:type="dc:Point" x="1569" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="1569" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1584" y="487" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80">
+ <di:waypoint xsi:type="dc:Point" x="743" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="635" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="1415" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
+ <dc:Bounds x="984" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask">
+ <dc:Bounds x="1176" y="1390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
+ <dc:Bounds x="984" y="1390" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">
+ <di:waypoint xsi:type="dc:Point" x="1176" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1084" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1130" y="1415" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135">
+ <di:waypoint xsi:type="dc:Point" x="984" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="843" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="935" y="1431.2411831373652" width="32" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
+ <dc:Bounds x="1341" y="688" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="768" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="810" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="781" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1256" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1311" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="1284" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds x="1342" y="1052" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1132" />
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1176" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1389" y="1159" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="156" y="1153" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="143" y="1213" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="181" y="1153" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="1089" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="187" y="1133.4787123394708" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24">
+ <di:waypoint xsi:type="dc:Point" x="206" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="1178" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="206" y="1182.7278101950883" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
+ <dc:Bounds x="1341" y="810" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="890" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="926" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="900" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">
+ <dc:Bounds x="626" y="859" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="651" y="914" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="156" y="1039" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="1054" width="46" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24">
+ <di:waypoint xsi:type="dc:Point" x="206" y="1064" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="1064" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="1153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="213" y="1067.6448598130842" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="181" y="1039" />
+ <di:waypoint xsi:type="dc:Point" x="181" y="971" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="971" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="1153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="185" y="1027.872131147541" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="493" y="709" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="488" y="683" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">
+ <di:waypoint xsi:type="dc:Point" x="543" y="734" />
+ <di:waypoint xsi:type="dc:Point" x="601" y="733" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="545" y="737.2172362208834" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217">
+ <di:waypoint xsi:type="dc:Point" x="517" y="758" />
+ <di:waypoint xsi:type="dc:Point" x="517" y="884" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="884" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526" y="761.1171067354646" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="599" y="1412" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="617" y="1453" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1029" y="968" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1047" y="1009" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds x="1200" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">
+ <di:waypoint xsi:type="dc:Point" x="1300" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1519" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1410" y="125" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
+ <dc:Bounds x="1601" y="355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1619" y="391" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">
+ <di:waypoint xsi:type="dc:Point" x="1637" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="1700" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1669" y="358" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
+ <dc:Bounds x="601" y="694" width="100" height="79" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24">
+ <di:waypoint xsi:type="dc:Point" x="651" y="909" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="946" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="927.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261">
+ <di:waypoint xsi:type="dc:Point" x="651" y="773" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="859" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="816" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1391" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1310" y="1430" />
+ <di:waypoint xsi:type="dc:Point" x="1276" y="1430" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="1425" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds x="-62" y="375" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-29" y="452" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-11" y="493" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="86" y="430" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="247" y="452" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="265" y="493" width="0" 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="7" y="470" />
+ <di:waypoint xsi:type="dc:Point" x="86" y="470" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="49" y="470" width="0" 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="186" y="470" />
+ <di:waypoint xsi:type="dc:Point" x="247" y="470" />
+ <bpmndi:BPMNLabel>
+ <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">
+ <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="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" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1200" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1127" y="140" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
+ <dc:Bounds x="1341" y="926" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157">
+ <di:waypoint xsi:type="dc:Point" x="1391" y="1006" />
+ <di:waypoint xsi:type="dc:Point" x="1392" y="1052" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1388" y="1028" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask">
+ <dc:Bounds x="1343" y="576" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156">
+ <di:waypoint xsi:type="dc:Point" x="1393" y="656" />
+ <di:waypoint xsi:type="dc:Point" x="1393" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="672" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="688" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1390" y="666" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1p6n2yy_di" bpmnElement="ScriptTask_1p6n2yy">
+ <dc:Bounds x="601" y="946" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1kid5y0_di" bpmnElement="CallActivity_1kid5y0">
+ <dc:Bounds x="739" y="946" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0voqz6r_di" bpmnElement="ScriptTask_0voqz6r">
+ <dc:Bounds x="883" y="946" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qr4es6_di" bpmnElement="SequenceFlow_0qr4es6">
+ <di:waypoint xsi:type="dc:Point" x="701" y="986" />
+ <di:waypoint xsi:type="dc:Point" x="739" y="986" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="720" y="971" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04rdjfi_di" bpmnElement="SequenceFlow_04rdjfi">
+ <di:waypoint xsi:type="dc:Point" x="983" y="986" />
+ <di:waypoint xsi:type="dc:Point" x="1029" y="986" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1006" y="961" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kjh92x_di" bpmnElement="ExclusiveGateway_1kjh92x" isMarkerVisible="true">
+ <dc:Bounds x="372" y="709" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="368" y="672" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nrc66n_di" bpmnElement="SequenceFlow_0nrc66n">
+ <di:waypoint xsi:type="dc:Point" x="422" y="734" />
+ <di:waypoint xsi:type="dc:Point" x="493" y="734" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="735" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0srdlf3_di" bpmnElement="SequenceFlow_0srdlf3">
+ <di:waypoint xsi:type="dc:Point" x="397" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="884" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="884" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="402" y="760" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1gedbow_di" bpmnElement="ScriptTask_1gedbow">
+ <dc:Bounds x="-11" y="1138" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_053re4q_di" bpmnElement="SequenceFlow_053re4q">
+ <di:waypoint xsi:type="dc:Point" x="89" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="156" y="1178" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="123" y="1163" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_1adrta3_di" bpmnElement="ExclusiveGateway_1dcb5p2">
+ <dc:Bounds x="372" y="1153" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="1203" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ze5k6c_di" bpmnElement="SequenceFlow_0ze5k6c">
+ <di:waypoint xsi:type="dc:Point" x="422" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="933" y="1178" />
+ <di:waypoint xsi:type="dc:Point" x="933" y="1026" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="1163" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_0qx19b9_di" bpmnElement="TextAnnotation_0qx19b9">
+ <dc:Bounds x="736" y="808" width="168" height="39" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_10dk4x3_di" bpmnElement="Association_10dk4x3">
+ <di:waypoint xsi:type="dc:Point" x="797" y="946" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="847" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..9d37d8084e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn
@@ -0,0 +1,374 @@
+<?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.4.0">
+ <bpmn:process id="DoUpdateNetworkInstanceRollback" name="DoUpdateNetworkInstanceRollback" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1krl2dg</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="Task_0whino1" name="PreProcess Incoming Data" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1krl2dg</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0u41iz2</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+DoUpdateNetworkInstanceRollback.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1krl2dg" sourceRef="StartEvent_1" targetRef="Task_0whino1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0u41iz2" sourceRef="Task_0whino1" targetRef="ExclusiveGateway_0v0en47" />
+ <bpmn:serviceTask id="ServiceTask_0bqh5yl" name="Call Rollback Network">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${UPDNETIR_rollbackNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}
+]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
+ <camunda:entry key="content-type">application/xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">PUT</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNETIR_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNETIR_rollbackNetworkResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0e1uixp</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_17o4w67</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0v0en47" name="is PO Network Rollback?" default="SequenceFlow_1lteduj">
+ <bpmn:incoming>SequenceFlow_0u41iz2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0e1uixp</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1lteduj</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:callActivity id="CallActivity_1xilevb" name="Call Rollback SDNC Adapter" calledElement="sdncAdapter">
+ <bpmn:extensionElements>
+ <camunda:in source="UPDNETIR_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:out source="SDNCA_ResponseCode" target="UPDNETIR_rollbackSDNCReturnCode" />
+ <camunda:out source="sdncAdapterResponse" target="UPDNETIR_rollbackSDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_101y57s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0790olb</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_17g4q5c" name="is RSRC SDNC?" default="SequenceFlow_101y57s">
+ <bpmn:incoming>SequenceFlow_0virkpu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_101y57s</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0mw0dgd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_1ggaxfu" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0qc4v9t</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0el8yzs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0yto4gz</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+DoUpdateNetworkInstanceRollback.validateRollbackResponses(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1n5jck8" name="is SDNC Rollback?" default="SequenceFlow_0qc4v9t">
+ <bpmn:incoming>SequenceFlow_1lteduj</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_17o4w67</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0virkpu</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0qc4v9t</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0e1uixp" name="Yes" sourceRef="ExclusiveGateway_0v0en47" targetRef="ServiceTask_0bqh5yl">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETIR_rollbackNetworkRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1lteduj" name="No" sourceRef="ExclusiveGateway_0v0en47" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_0virkpu" name="Yes" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ExclusiveGateway_17g4q5c">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETIR_rollbackSDNCRequest") != null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_17o4w67" sourceRef="ServiceTask_0bqh5yl" targetRef="ExclusiveGateway_1n5jck8" />
+ <bpmn:sequenceFlow id="SequenceFlow_101y57s" name="No" sourceRef="ExclusiveGateway_17g4q5c" targetRef="CallActivity_1xilevb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0mw0dgd" name="Yes" sourceRef="ExclusiveGateway_17g4q5c" targetRef="ExclusiveGateway_0b9kbop">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_1fvr7ad">
+ <bpmn:incoming>SequenceFlow_0yto4gz</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0qc4v9t" name="No" sourceRef="ExclusiveGateway_1n5jck8" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0790olb" sourceRef="CallActivity_1xilevb" targetRef="ExclusiveGateway_0b9kbop" />
+ <bpmn:subProcess id="SubProcess_1p4663w" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_0by1uwk" name="Log / Print Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xktw7v</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0soe5t3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+DoUpdateNetworkInstanceRollback.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_1j0eixl">
+ <bpmn:outgoing>SequenceFlow_0xktw7v</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0jxh015">
+ <bpmn:incoming>SequenceFlow_0soe5t3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xktw7v" name="" sourceRef="StartEvent_1j0eixl" targetRef="ScriptTask_0by1uwk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0soe5t3" name="" sourceRef="ScriptTask_0by1uwk" targetRef="EndEvent_0jxh015" />
+ </bpmn:subProcess>
+ <bpmn:inclusiveGateway id="ExclusiveGateway_0b9kbop">
+ <bpmn:incoming>SequenceFlow_0790olb</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0mw0dgd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0el8yzs</bpmn:outgoing>
+ </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0el8yzs" sourceRef="ExclusiveGateway_0b9kbop" targetRef="ScriptTask_1ggaxfu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0yto4gz" sourceRef="ScriptTask_1ggaxfu" targetRef="EndEvent_1fvr7ad" />
+ <bpmn:subProcess id="SubProcess_1b8rnqv" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:scriptTask id="ScriptTask_02d3i14" name="Catch Exception">
+ <bpmn:incoming>SequenceFlow_07kf49j</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01syg1x</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("workflowException", execution.getVariable("WorkflowException")]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:startEvent id="StartEvent_0e8yrgo">
+ <bpmn:outgoing>SequenceFlow_07kf49j</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1cmovvm">
+ <bpmn:incoming>SequenceFlow_01syg1x</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_07kf49j" name="" sourceRef="StartEvent_0e8yrgo" targetRef="ScriptTask_02d3i14" />
+ <bpmn:sequenceFlow id="SequenceFlow_01syg1x" name="" sourceRef="ScriptTask_02d3i14" targetRef="EndEvent_1cmovvm" />
+ </bpmn:subProcess>
+ <bpmn:textAnnotation id="TextAnnotation_000ap15"> <bpmn:text><![CDATA[Include ONLY inputs/varrables:  
+rollbackData, as Map
+-rollbackSDNCRequest
+-rollbackNetworkRequest
+WorkflowException
+ 
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_0ybkmal" sourceRef="Task_0whino1" targetRef="TextAnnotation_000ap15" />
+ <bpmn:textAnnotation id="TextAnnotation_0vwyo82"> <bpmn:text><![CDATA[set value for:
+WorkflowException
+rolledBack
+wasDeleted
+]]></bpmn:text>
+</bpmn:textAnnotation>
+ <bpmn:association id="Association_1gx121b" sourceRef="ScriptTask_1ggaxfu" targetRef="TextAnnotation_0vwyo82" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateNetworkInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="240" y="354" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="390" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1dqe09s_di" bpmnElement="Task_0whino1">
+ <dc:Bounds x="403" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1krl2dg_di" bpmnElement="SequenceFlow_1krl2dg">
+ <di:waypoint xsi:type="dc:Point" x="276" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="382" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="382" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="403" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="372" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0u41iz2_di" bpmnElement="SequenceFlow_0u41iz2">
+ <di:waypoint xsi:type="dc:Point" x="503" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="660" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="582" y="357" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0bqh5yl_di" bpmnElement="ServiceTask_0bqh5yl">
+ <dc:Bounds x="635" y="481" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0v0en47_di" bpmnElement="ExclusiveGateway_0v0en47" isMarkerVisible="true">
+ <dc:Bounds x="660" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="648" y="312" width="74" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_000ap15_di" bpmnElement="TextAnnotation_000ap15">
+ <dc:Bounds x="469" y="133" width="277" height="115" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0ybkmal_di" bpmnElement="Association_0ybkmal">
+ <di:waypoint xsi:type="dc:Point" x="487" y="332" />
+ <di:waypoint xsi:type="dc:Point" x="559" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1xilevb_di" bpmnElement="CallActivity_1xilevb">
+ <dc:Bounds x="995" y="610" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_17g4q5c_di" bpmnElement="ExclusiveGateway_17g4q5c" isMarkerVisible="true">
+ <dc:Bounds x="879" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="474" width="82" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1ggaxfu_di" bpmnElement="ScriptTask_1ggaxfu">
+ <dc:Bounds x="1123" y="332" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1n5jck8_di" bpmnElement="ExclusiveGateway_1n5jck8" isMarkerVisible="true">
+ <dc:Bounds x="879" y="347" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="308" width="48" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TextAnnotation_0vwyo82_di" bpmnElement="TextAnnotation_0vwyo82">
+ <dc:Bounds x="1287" y="410" width="165" height="60" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_1gx121b_di" bpmnElement="Association_1gx121b">
+ <di:waypoint xsi:type="dc:Point" x="1223" y="389" />
+ <di:waypoint xsi:type="dc:Point" x="1287" y="412" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e1uixp_di" bpmnElement="SequenceFlow_0e1uixp">
+ <di:waypoint xsi:type="dc:Point" x="685" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="439" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="481" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="693" y="395" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lteduj_di" bpmnElement="SequenceFlow_1lteduj">
+ <di:waypoint xsi:type="dc:Point" x="710" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="716" y="350" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0virkpu_di" bpmnElement="SequenceFlow_0virkpu">
+ <di:waypoint xsi:type="dc:Point" x="904" y="397" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="496" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="914" y="392.7469456247061" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_17o4w67_di" bpmnElement="SequenceFlow_17o4w67">
+ <di:waypoint xsi:type="dc:Point" x="735" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="879" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="446.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_101y57s_di" bpmnElement="SequenceFlow_101y57s">
+ <di:waypoint xsi:type="dc:Point" x="904" y="546" />
+ <di:waypoint xsi:type="dc:Point" x="904" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="913" y="544.0784313725491" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mw0dgd_di" bpmnElement="SequenceFlow_0mw0dgd">
+ <di:waypoint xsi:type="dc:Point" x="929" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="1148" y="521" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="937" y="500" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1fvr7ad_di" bpmnElement="EndEvent_1fvr7ad">
+ <dc:Bounds x="1352" y="354" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1370" y="390" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qc4v9t_di" bpmnElement="SequenceFlow_0qc4v9t">
+ <di:waypoint xsi:type="dc:Point" x="929" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1123" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="351.1191898360114" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0790olb_di" bpmnElement="SequenceFlow_0790olb">
+ <di:waypoint xsi:type="dc:Point" x="1095" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="546" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1134" y="635" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1p4663w_di" bpmnElement="SubProcess_1p4663w" isExpanded="true">
+ <dc:Bounds x="61" y="668" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0by1uwk_di" bpmnElement="ScriptTask_0by1uwk">
+ <dc:Bounds x="209" y="723" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1j0eixl_di" bpmnElement="StartEvent_1j0eixl">
+ <dc:Bounds x="94" y="745" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="112" y="786" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jxh015_di" bpmnElement="EndEvent_0jxh015">
+ <dc:Bounds x="370" y="745" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="786" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xktw7v_di" bpmnElement="SequenceFlow_0xktw7v">
+ <di:waypoint xsi:type="dc:Point" x="130" y="763" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="763" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="763" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0soe5t3_di" bpmnElement="SequenceFlow_0soe5t3">
+ <di:waypoint xsi:type="dc:Point" x="309" y="763" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="763" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="763" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0dot6c9_di" bpmnElement="ExclusiveGateway_0b9kbop">
+ <dc:Bounds x="1148" y="496" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="546" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0el8yzs_di" bpmnElement="SequenceFlow_0el8yzs">
+ <di:waypoint xsi:type="dc:Point" x="1173" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="1173" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="444" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yto4gz_di" bpmnElement="SequenceFlow_0yto4gz">
+ <di:waypoint xsi:type="dc:Point" x="1223" y="372" />
+ <di:waypoint xsi:type="dc:Point" x="1352" y="372" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1288" y="357" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1b8rnqv_di" bpmnElement="SubProcess_1b8rnqv" isExpanded="true">
+ <dc:Bounds x="61" y="916" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_02d3i14_di" bpmnElement="ScriptTask_02d3i14">
+ <dc:Bounds x="209" y="971" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0e8yrgo_di" bpmnElement="StartEvent_0e8yrgo">
+ <dc:Bounds x="94" y="993" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="112" y="1034" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1cmovvm_di" bpmnElement="EndEvent_1cmovvm">
+ <dc:Bounds x="370" y="993" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1034" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_07kf49j_di" bpmnElement="SequenceFlow_07kf49j">
+ <di:waypoint xsi:type="dc:Point" x="130" y="1011" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="1011" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="172" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01syg1x_di" bpmnElement="SequenceFlow_01syg1x">
+ <di:waypoint xsi:type="dc:Point" x="309" y="1011" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="1011" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="1011" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVfModule.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVfModule.bpmn
new file mode 100644
index 0000000000..46e7ddcbe6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVfModule.bpmn
@@ -0,0 +1,671 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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="DoUpdateVfModule" name="DoUpdateVfModule" isExecutable="true">
+ <bpmn2:documentation><![CDATA[This flow expects its incoming request to be in the variable 'DoUpdateVfModuleRequest'. This flow produces no output.]]></bpmn2:documentation>
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModule_prep" name="Prepare Update AAI Vf Module (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepPrepareUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="PrepareUpdateAAIVfModule_prep" targetRef="ScriptTask_1" />
+ <bpmn2:callActivity id="ScriptTask_1" name="Prepare Update AAI Vf Module" calledElement="PrepareUpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_prepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="PUAAIVfMod_outVfModule" target="DOUPVfMod_vfModule" />
+ <camunda:out source="PUAAIVfMod_vnfName" target="DOUPVfMod_vnfNameFromAAI" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="PrepareUpdateAAIVfModule_prep" />
+ <bpmn2:subProcess id="SubProcess_1" name="Catch Exception" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_16" name="Handle Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.handleWorkflowException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_16" targetRef="EndEvent_3" />
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_16" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12" />
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_5" />
+ <bpmn2:scriptTask id="ScriptTask_10" name="Update AAI Vf Module (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ScriptTask_10" targetRef="ScriptTask_11" />
+ <bpmn2:callActivity id="ScriptTask_11" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
+ <bpmn2:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DOUPVfMod_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ScriptTask_11" targetRef="ScriptTask_12" />
+ <bpmn2:scriptTask id="ScriptTask_12" name="SDNC Topology Activate (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyAct(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ScriptTask_12" targetRef="ScriptTask_13" />
+ <bpmn2:callActivity id="ScriptTask_13" name="SDNCAdapter Topology Activate" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncActivateRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncActivateResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_14" name="Update AAI Generic Vnf (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_14" targetRef="ExclusiveGateway_1" />
+ <bpmn2:callActivity id="CallActivity_1" name="UpdateAAIGenericVnf" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_10" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Skip Update
+&#10;Generic Vnf?" default="SequenceFlow_14">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="Do the update" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="Skip the update" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_10">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[${execution.getVariable('DOUPVfMod_skipUpdateGenericVnf')} == true]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest" />
+ <bpmn2:scriptTask id="ScriptTask_4" name="SDNC Topology Change/Assign (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyChg(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_4" targetRef="ScriptTask_5" />
+ <bpmn2:callActivity id="ScriptTask_5" name="SDNC Adapter Topology Change/Assign" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncChangeAssignRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncChangeAssignResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="ScriptTask_9" name="VnfAdapterRest" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_vnfAdapterRestRequest" target="vnfAdapterRestV1Request" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="vnfAdapterRestV1Response" target="DOUPVfMod_vnfAdapterRestResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_9" targetRef="ScriptTask_14" />
+ <bpmn2:scriptTask id="ScriptTask_8" name="VNF Adapter (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepVnfAdapterRest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_9" />
+ <bpmn2:scriptTask id="ScriptTask_15" name="Validate SDNC Query Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncTopologyResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "query")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_7" name="SDNCAdapter Topology Query" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_sdncTopologyRequest" target="sdncAdapterWorkflowRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncTopologyResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_18" name="Validate SDNC Change/Assign Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncChangeAssignResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "changeassign")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_18" />
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_18" targetRef="ScriptTask_6" />
+ <bpmn2:scriptTask id="ScriptTask_6" name="SDNC Topology Query (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyQuery(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_15" />
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_15" targetRef="ScriptTask_8" />
+ <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_1" targetRef="IsBaseVfModule" />
+ <bpmn2:callActivity id="ScriptTask_3" name="Confirm VolumeGroup Tenant" calledElement="ConfirmVolumeGroupTenant">
+ <bpmn2:extensionElements>
+ <camunda:in source="DOUPVfMod_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DOUPVfMod_tenantId" target="tenantId" />
+ <camunda:in source="DOUPVfMod_cloudRegionForVolume" target="aicCloudRegion" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DOUPVfMod_volumeGroupStackId" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_3" targetRef="ScriptTask_4" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Confirm VolumeGroup Tenant (prep)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepConfirmVolumeGroupTenant(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_3" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="VolumeGroupId
+&#10;present?" default="SequenceFlow_16">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[${execution.getVariable('DOUPVfMod_volumeGroupId').isEmpty()} == false]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="No" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DOUPVfMod_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def doUpdateVfModule = new DoUpdateVfModule()
+doUpdateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_3" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
+ <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_13" targetRef="ScriptTask_19" />
+ <bpmn2:scriptTask id="ScriptTask_19" name="PostProcess SDNC Adapter Activate" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncActivateResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_17" name="Set Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[// This variable is checked by the unit test
+execution.setVariable('DoUpdateVfModuleSuccessIndicator', true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_17" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1" name="TheEnd">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_19" targetRef="ScriptTask_17" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds x="150" y="214" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="255" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds x="300" y="192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="186" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="208" y="232" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="PrepareUpdateAAIVfModule_prep">
+ <dc:Bounds x="456" y="192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="400" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="456" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="492" y="232" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_164" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="624" y="192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_164">
+ <di:waypoint xsi:type="dc:Point" x="556" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="575" y="232" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_88" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1039" y="206" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1011" y="172" width="109" height="38" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_165" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1152" y="192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_165">
+ <di:waypoint xsi:type="dc:Point" x="1089" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="1152" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1099" y="231" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_166" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="1308" y="192" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_165" targetElement="_BPMNShape_ScriptTask_166">
+ <di:waypoint xsi:type="dc:Point" x="1252" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="1308" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="232" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="72" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_5">
+ <dc:Bounds x="239" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_169" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="535" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_167" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="172" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="239" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="197" y="460" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_167">
+ <di:waypoint xsi:type="dc:Point" x="1064" y="256" />
+ <di:waypoint xsi:type="dc:Point" x="1064" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="122" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="122" y="420" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1073" y="271" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_166" targetElement="_BPMNShape_ScriptTask_167">
+ <di:waypoint xsi:type="dc:Point" x="1358" y="272" />
+ <di:waypoint xsi:type="dc:Point" x="1358" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="639" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="122" y="352" />
+ <di:waypoint xsi:type="dc:Point" x="122" y="420" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="352" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="684" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_169" targetElement="_BPMNShape_ScriptTask_170">
+ <di:waypoint xsi:type="dc:Point" x="635" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="648" y="460" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="ScriptTask_8">
+ <dc:Bounds x="996" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ScriptTask_9">
+ <dc:Bounds x="1176" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_ScriptTask_172">
+ <di:waypoint xsi:type="dc:Point" x="1096" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1133" y="460" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="ScriptTask_10">
+ <dc:Bounds x="466" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="ScriptTask_11">
+ <dc:Bounds x="624" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ScriptTask_219">
+ <di:waypoint xsi:type="dc:Point" x="1226" y="500" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="576" />
+ <di:waypoint xsi:type="dc:Point" x="194" y="576" />
+ <di:waypoint xsi:type="dc:Point" x="194" y="636" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="821" y="576" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_ScriptTask_174">
+ <di:waypoint xsi:type="dc:Point" x="566" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="591" y="676" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="ScriptTask_12">
+ <dc:Bounds x="804" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="ScriptTask_13">
+ <dc:Bounds x="984" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_ScriptTask_175">
+ <di:waypoint xsi:type="dc:Point" x="724" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="804" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="695" y="674" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_ScriptTask_176">
+ <di:waypoint xsi:type="dc:Point" x="904" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="984" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="676" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1208" y="906" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1201" y="947" width="50" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="239" y="924" width="475" height="198" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="ScriptTask_16">
+ <dc:Bounds x="399" y="984" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_3">
+ <dc:Bounds x="617" y="1006" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="1047" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_163">
+ <di:waypoint xsi:type="dc:Point" x="499" y="1024" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="1024" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="555" y="1024" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_46" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="696" y="1005" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="711" y="1046" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_5">
+ <dc:Bounds x="814" y="1005" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832" y="1046" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_BoundaryEvent_46" targetElement="_BPMNShape_EndEvent_164">
+ <di:waypoint xsi:type="dc:Point" x="732" y="1023" />
+ <di:waypoint xsi:type="dc:Point" x="814" y="1023" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="1023" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_56" bpmnElement="StartEvent_3">
+ <dc:Bounds x="305" y="1006" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="1047" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_StartEvent_56" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="341" y="1024" />
+ <di:waypoint xsi:type="dc:Point" x="399" y="1024" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="302" y="1084" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_180" bpmnElement="ScriptTask_17">
+ <dc:Bounds x="1176" y="768" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_180" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="1226" y="848" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="906" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1223" y="868" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="ScriptTask_14">
+ <dc:Bounds x="144" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="CallActivity_1">
+ <dc:Bounds x="300" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_2" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="400" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="466" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="676" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ExclusiveGateway_213">
+ <di:waypoint xsi:type="dc:Point" x="194" y="716" />
+ <di:waypoint xsi:type="dc:Point" x="195" y="793" />
+ <di:waypoint xsi:type="dc:Point" x="284" y="793" />
+ <di:waypoint xsi:type="dc:Point" x="324" y="793" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="191" y="746" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="324" y="768" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="823" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_CallActivity_2">
+ <di:waypoint xsi:type="dc:Point" x="349" y="768" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="716" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="357" y="733" width="80" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_173">
+ <di:waypoint xsi:type="dc:Point" x="374" y="793" />
+ <di:waypoint xsi:type="dc:Point" x="515" y="793" />
+ <di:waypoint xsi:type="dc:Point" x="516" y="716" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="380" y="768" width="97" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="ScriptTask_15">
+ <dc:Bounds x="840" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="ScriptTask_18">
+ <dc:Bounds x="384" y="420" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_221">
+ <di:waypoint xsi:type="dc:Point" x="339" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="460" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_169">
+ <di:waypoint xsi:type="dc:Point" x="484" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="535" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="511" y="460" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_ScriptTask_220">
+ <di:waypoint xsi:type="dc:Point" x="784" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="840" y="460" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_171">
+ <di:waypoint xsi:type="dc:Point" x="940" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="996" y="460" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_214" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="965" y="206" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="990" y="261" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds x="770" y="206" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="795" y="261" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds x="849" y="72" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_164" targetElement="_BPMNShape_ExclusiveGateway_215">
+ <di:waypoint xsi:type="dc:Point" x="724" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="747" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="747" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="770" y="231" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_214">
+ <di:waypoint xsi:type="dc:Point" x="820" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="965" y="231" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="231" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_214" targetElement="_BPMNShape_ExclusiveGateway_88">
+ <di:waypoint xsi:type="dc:Point" x="1015" y="231" />
+ <di:waypoint xsi:type="dc:Point" x="1039" y="231" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1015" y="231" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="795" y="206" />
+ <di:waypoint xsi:type="dc:Point" x="795" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="849" y="112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="151" width="20" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ExclusiveGateway_214">
+ <di:waypoint xsi:type="dc:Point" x="949" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="966" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="990" y="112" />
+ <di:waypoint xsi:type="dc:Point" x="990" y="206" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="987" y="136" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="ScriptTask_19">
+ <dc:Bounds x="1176" y="636" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ScriptTask_286">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="1176" y="676" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1121" y="676" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_ScriptTask_180">
+ <di:waypoint xsi:type="dc:Point" x="1226" y="716" />
+ <di:waypoint xsi:type="dc:Point" x="1226" y="768" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVnfAndModules.bpmn
new file mode 100644
index 0000000000..ae77461070
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateVnfAndModules.bpmn
@@ -0,0 +1,275 @@
+<?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="_9MhrcHqVEea26OhQB97uCQ" 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="DoUpdateVnfAndModules" name="DoUpdateVnfAndModules" isExecutable="true">
+ <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:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08nd69s</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoUpdateVnfAndModules updateVnfAndModules = new DoUpdateVnfAndModules()
+updateVnfAndModules.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
+ <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_0of4kmm</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1amun4k" name="Are there VF modules to update?" default="SequenceFlow_19c7hcw">
+ <bpmn2:incoming>SequenceFlow_0t4yszi</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1f4mbkc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1qrkdn3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_19c7hcw</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08nd69s" sourceRef="intialization" targetRef="QueryVnf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qrkdn3" name="yes" sourceRef="ExclusiveGateway_1amun4k" targetRef="PrepareModuleList">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DUVAM_nextModule") < execution.getVariable("DUVAM_moduleCount")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="UpdateVFModule" name="Do Update VF Module" calledElement="DoUpdateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isVidRequest" target="isVidRequest" />
+ <camunda:in source="vnfType" target="vnfType" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="DUVAM_vfModuleName" target="vfModuleName" />
+ <camunda:in source="DUVAM_vfModuleId" target="vfModuleId" />
+ <camunda:in source="DUVAM_volumeGroupId" target="volumeGroupId" />
+ <camunda:in source="DUVAM_volumeGroupName" target="volumeGroupName" />
+ <camunda:in source="DUVAM_isBaseVfModule" target="isBaseVfModule" />
+ <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="DUVAM_vfModuleModelInfo" target="vfModuleModelInfo" />
+ <camunda:in source="usePreload" target="usePreload" />
+ <camunda:in source="vfModuleInputParams" target="vfModuleInputParams" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_04o61yk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1p4ycii" sourceRef="UpdateVFModule" targetRef="PostProcessUpdateVfModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0t4yszi" sourceRef="PostProcessUpdateVfModule" targetRef="ExclusiveGateway_1amun4k" />
+ <bpmn2:scriptTask id="QueryVnf" name="Query VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_08nd69s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1f4mbkc</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvam = new DoUpdateVnfAndModules()
+duvam.queryAAIVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PrepareModuleList" name="Prepare Next Module To Update" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1qrkdn3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04o61yk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvam = new DoUpdateVnfAndModules()
+duvam.prepareNextModuleToUpdate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="PostProcessUpdateVfModule" name="PostProcess Update VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+int nextModule = execution.getVariable("DUVAM_nextModule")
+ execution.setVariable("DUVAM_nextModule", nextModule + 1)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_04o61yk" sourceRef="PrepareModuleList" targetRef="UpdateVFModule" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19c7hcw" name="no" sourceRef="ExclusiveGateway_1amun4k" targetRef="PreProcessUpdateAAIGenericVNF" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0of4kmm" sourceRef="UpdateAAIGenericVNFTask" targetRef="EndEvent_2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ltycz6" sourceRef="PreProcessUpdateAAIGenericVNF" targetRef="UpdateAAIGenericVNFTask" />
+ <bpmn2:callActivity id="UpdateAAIGenericVNFTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DUVAM_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="mso-service-id" target="mso-service-id" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1ltycz6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0of4kmm</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVNF" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19c7hcw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ltycz6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def duvam = new DoUpdateVnfAndModules()
+duvam.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f4mbkc" sourceRef="QueryVnf" targetRef="ExclusiveGateway_1amun4k" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="238" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
+ <dc:Bounds x="344" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
+ <di:waypoint xsi:type="dc:Point" x="274" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="344" y="228" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="212.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1441" y="279" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1459" y="320" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="242" y="457" width="431" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="390" y="518" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="408" y="559" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="606" y="518" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="624" y="559" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="460" y="496" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
+ <di:waypoint xsi:type="dc:Point" x="426" y="536" />
+ <di:waypoint xsi:type="dc:Point" x="460" y="536" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="443" y="521" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="560" y="536" />
+ <di:waypoint xsi:type="dc:Point" x="606" y="536" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="583" y="521" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true">
+ <dc:Bounds x="706" y="201" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="660" y="248" width="65" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08nd69s_di" bpmnElement="SequenceFlow_08nd69s">
+ <di:waypoint xsi:type="dc:Point" x="444" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="512" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="478" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qrkdn3_di" bpmnElement="SequenceFlow_1qrkdn3">
+ <di:waypoint xsi:type="dc:Point" x="731" y="201" />
+ <di:waypoint xsi:type="dc:Point" x="731" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="92" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="151" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="UpdateVFModule">
+ <dc:Bounds x="983" y="52" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii">
+ <di:waypoint xsi:type="dc:Point" x="1083" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="1164" y="92" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1124" y="77" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi">
+ <di:waypoint xsi:type="dc:Point" x="1214" y="132" />
+ <di:waypoint xsi:type="dc:Point" x="1214" y="226" />
+ <di:waypoint xsi:type="dc:Point" x="756" y="226" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1229" y="179" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_12xsp2f_di" bpmnElement="QueryVnf">
+ <dc:Bounds x="512" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01c9qas_di" bpmnElement="PrepareModuleList">
+ <dc:Bounds x="816" y="52" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessUpdateVfModule">
+ <dc:Bounds x="1164" y="52" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04o61yk_di" bpmnElement="SequenceFlow_04o61yk">
+ <di:waypoint xsi:type="dc:Point" x="916" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="983" y="92" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="950" y="77" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19c7hcw_di" bpmnElement="SequenceFlow_19c7hcw">
+ <di:waypoint xsi:type="dc:Point" x="731" y="251" />
+ <di:waypoint xsi:type="dc:Point" x="731" y="295" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="297" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="908" y="273" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0of4kmm_di" bpmnElement="SequenceFlow_0of4kmm">
+ <di:waypoint xsi:type="dc:Point" x="1367" y="297" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="297" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="297" />
+ <di:waypoint xsi:type="dc:Point" x="1441" y="297" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="297" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ltycz6_di" bpmnElement="SequenceFlow_1ltycz6">
+ <di:waypoint xsi:type="dc:Point" x="1211" y="297" />
+ <di:waypoint xsi:type="dc:Point" x="1267" y="297" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1239" y="282" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1cem00f_di" bpmnElement="UpdateAAIGenericVNFTask">
+ <dc:Bounds x="1267" y="257" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0snu9sv_di" bpmnElement="PreProcessUpdateAAIGenericVNF">
+ <dc:Bounds x="1111" y="257" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f4mbkc_di" bpmnElement="SequenceFlow_1f4mbkc">
+ <di:waypoint xsi:type="dc:Point" x="612" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="706" y="226" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="659" y="211.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/RollbackVnf.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/RollbackVnf.bpmn
new file mode 100644
index 0000000000..e1300c978f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/RollbackVnf.bpmn
@@ -0,0 +1,346 @@
+<?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.11.3">
+ <bpmn:process id="RollbackVnf" name="RollbackVnf" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_0bie3cu</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0dysixy" name="Start VNF?" default="SequenceFlow_0tj5bkd">
+ <bpmn:incoming>SequenceFlow_0mpoa26</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1pirwg0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1lne8je</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0tj5bkd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1iuuwqx" name="Unlock VNF?" default="SequenceFlow_0b2y2dw">
+ <bpmn:incoming>SequenceFlow_0tj5bkd</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1ney8l6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0gsro0z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0b2y2dw</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1oswdsn" name="Unset closedLoopDisabled Flag?" default="SequenceFlow_0c5ovtd">
+ <bpmn:incoming>SequenceFlow_0b2y2dw</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_11556y3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0skjb2u</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0c5ovtd</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0bu2ybs" name="Unset VNF inMaintenance Flag?" default="SequenceFlow_03qkk4e">
+ <bpmn:incoming>SequenceFlow_0g18wrd</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0c5ovtd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12bz15k</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_03qkk4e</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1lne8je" name="yes" sourceRef="ExclusiveGateway_0dysixy" targetRef="Task_0zktukf">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("rollbackErrorCode") == "0" && execution.getVariable("rollbackVnfStop") == true]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0tj5bkd" name="no" sourceRef="ExclusiveGateway_0dysixy" targetRef="ExclusiveGateway_1iuuwqx" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ney8l6" sourceRef="Task_0zktukf" targetRef="ExclusiveGateway_1iuuwqx" />
+ <bpmn:sequenceFlow id="SequenceFlow_0gsro0z" name="yes" sourceRef="ExclusiveGateway_1iuuwqx" targetRef="Task_10x6bcq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("rollbackErrorCode") == "0" && execution.getVariable("rollbackVnfLock") == true]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0b2y2dw" name="no" sourceRef="ExclusiveGateway_1iuuwqx" targetRef="ExclusiveGateway_1oswdsn" />
+ <bpmn:sequenceFlow id="SequenceFlow_11556y3" sourceRef="Task_10x6bcq" targetRef="ExclusiveGateway_1oswdsn" />
+ <bpmn:sequenceFlow id="SequenceFlow_0skjb2u" name="yes" sourceRef="ExclusiveGateway_1oswdsn" targetRef="Task_0uvsonk">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("rollbackErrorCode") == "0" && execution.getVariable("rollbackSetClosedLoopDisabledFlag") == true]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0g18wrd" sourceRef="Task_0uvsonk" targetRef="ExclusiveGateway_0bu2ybs" />
+ <bpmn:sequenceFlow id="SequenceFlow_12bz15k" name="yes" sourceRef="ExclusiveGateway_0bu2ybs" targetRef="Task_1uwp7nt">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("rollbackErrorCode") == "0" && execution.getVariable("rollbackSetVnfInMaintenanceFlag") == true]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0bie3cu" sourceRef="StartEvent_1" targetRef="Task_1k4wj72" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ix4dpf" sourceRef="Task_1k4wj72" targetRef="ExclusiveGateway_1lztiva" />
+ <bpmn:scriptTask id="Task_1k4wj72" name="PreProcess Rollback Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0bie3cu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ix4dpf</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new RollbackVnf()
+uvfm.preProcessRequest(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0c5ovtd" name="no" sourceRef="ExclusiveGateway_1oswdsn" targetRef="ExclusiveGateway_0bu2ybs" />
+ <bpmn:callActivity id="Task_0zktukf" name="Call APP-C VNF Start" calledElement="AppCClient">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStart" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="rollbackErrorCode" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1lne8je</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ney8l6</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:callActivity id="Task_10x6bcq" name="Call APP-C VNF Unlock" calledElement="AppCClient">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionUnlock" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="rollbackErrorCode" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0gsro0z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_11556y3</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_0uvsonk" name="Unset VF Is Closed Loop DisabledFlag in A&#38;AI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0skjb2u</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0g18wrd</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new RollbackVnf()
+uvfm.setClosedLoopDisabledInAAI(execution, false)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1uwp7nt" name="Unset VNF In Maintenance Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_12bz15k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0tkvd6f</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new RollbackVnf()
+uvfm.setVnfInMaintFlagInAAI(execution, false)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_1ull6mm">
+ <bpmn:incoming>SequenceFlow_1p3pyal</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_03qkk4e" name="no" sourceRef="ExclusiveGateway_0bu2ybs" targetRef="Task_1bahewx" />
+ <bpmn:sequenceFlow id="SequenceFlow_0tkvd6f" sourceRef="Task_1uwp7nt" targetRef="Task_1bahewx" />
+ <bpmn:scriptTask id="Task_1bahewx" name="Set Rollback Result" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_03qkk4e</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0tkvd6f</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1p3pyal</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new RollbackVnf()
+uvfm.setRollbackResult(execution)
+]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1p3pyal" sourceRef="Task_1bahewx" targetRef="EndEvent_1ull6mm" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1lztiva" name="Resume Traffic?" default="SequenceFlow_0mpoa26">
+ <bpmn:incoming>SequenceFlow_1ix4dpf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0mpoa26</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_05ihl7f</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0mpoa26" name="no" sourceRef="ExclusiveGateway_1lztiva" targetRef="ExclusiveGateway_0dysixy" />
+ <bpmn:sequenceFlow id="SequenceFlow_05ihl7f" name="yes" sourceRef="ExclusiveGateway_1lztiva" targetRef="Task_0d4mz7a">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("rollbackErrorCode") == "0" && execution.getVariable("rollbackQuiesceTraffic") == true]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1pirwg0" sourceRef="Task_0d4mz7a" targetRef="ExclusiveGateway_0dysixy" />
+ <bpmn:callActivity id="Task_0d4mz7a" name="Call APP-C Resume Traffic" calledElement="AppCClient">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionResumeTraffic" target="action" />
+ <camunda:in source="payload" target="payload" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="vnfName" target="vnfName" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="errorCode" target="rollbackErrorCode" />
+ <camunda:in source="controllerType" target="controllerType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_05ihl7f</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1pirwg0</bpmn:outgoing>
+ </bpmn:callActivity>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="RollbackVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="164" y="154" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="182" y="190" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0dysixy_di" bpmnElement="ExclusiveGateway_0dysixy" isMarkerVisible="true">
+ <dc:Bounds x="786" y="147" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="784" y="197" width="54" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1iuuwqx_di" bpmnElement="ExclusiveGateway_1iuuwqx" isMarkerVisible="true">
+ <dc:Bounds x="1040" y="147" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1032" y="197" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1oswdsn_di" bpmnElement="ExclusiveGateway_1oswdsn" isMarkerVisible="true">
+ <dc:Bounds x="1297" y="147" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1279" y="197" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0bu2ybs_di" bpmnElement="ExclusiveGateway_0bu2ybs" isMarkerVisible="true">
+ <dc:Bounds x="1532" y="147" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1520" y="197" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lne8je_di" bpmnElement="SequenceFlow_1lne8je">
+ <di:waypoint xsi:type="dc:Point" x="811" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="877" y="61" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="817" y="104" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tj5bkd_di" bpmnElement="SequenceFlow_0tj5bkd">
+ <di:waypoint xsi:type="dc:Point" x="836" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1040" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="932" y="151" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ney8l6_di" bpmnElement="SequenceFlow_1ney8l6">
+ <di:waypoint xsi:type="dc:Point" x="977" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1065" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1065" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1021" y="46" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0gsro0z_di" bpmnElement="SequenceFlow_0gsro0z">
+ <di:waypoint xsi:type="dc:Point" x="1065" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="1065" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1143" y="61" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1071" y="94" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b2y2dw_di" bpmnElement="SequenceFlow_0b2y2dw">
+ <di:waypoint xsi:type="dc:Point" x="1090" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1297" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11556y3_di" bpmnElement="SequenceFlow_11556y3">
+ <di:waypoint xsi:type="dc:Point" x="1243" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1322" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1322" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1283" y="46" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0skjb2u_di" bpmnElement="SequenceFlow_0skjb2u">
+ <di:waypoint xsi:type="dc:Point" x="1322" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="1322" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1376" y="61" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1328" y="94" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g18wrd_di" bpmnElement="SequenceFlow_0g18wrd">
+ <di:waypoint xsi:type="dc:Point" x="1476" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1517" y="46" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12bz15k_di" bpmnElement="SequenceFlow_12bz15k">
+ <di:waypoint xsi:type="dc:Point" x="1557" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1600" y="61" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1563" y="94" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bie3cu_di" bpmnElement="SequenceFlow_0bie3cu">
+ <di:waypoint xsi:type="dc:Point" x="200" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="315" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="258" y="157" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ix4dpf_di" bpmnElement="SequenceFlow_1ix4dpf">
+ <di:waypoint xsi:type="dc:Point" x="415" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="524" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="470" y="157" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_12bnvgq_di" bpmnElement="Task_1k4wj72">
+ <dc:Bounds x="315" y="132" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c5ovtd_di" bpmnElement="SequenceFlow_0c5ovtd">
+ <di:waypoint xsi:type="dc:Point" x="1347" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1532" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1434" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0gw56ug_di" bpmnElement="Task_0zktukf">
+ <dc:Bounds x="877" y="21" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_04vh5qa_di" bpmnElement="Task_10x6bcq">
+ <dc:Bounds x="1143" y="21" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0k4zdeb_di" bpmnElement="Task_0uvsonk">
+ <dc:Bounds x="1376" y="21" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uergdm_di" bpmnElement="Task_1uwp7nt">
+ <dc:Bounds x="1600" y="21" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1ull6mm_di" bpmnElement="EndEvent_1ull6mm">
+ <dc:Bounds x="1909" y="145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1927" y="181" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_03qkk4e_di" bpmnElement="SequenceFlow_03qkk4e">
+ <di:waypoint xsi:type="dc:Point" x="1582" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1664" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1664" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="1728" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1678" y="145" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tkvd6f_di" bpmnElement="SequenceFlow_0tkvd6f">
+ <di:waypoint xsi:type="dc:Point" x="1700" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1778" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="1778" y="123" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1739" y="46" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hobybp_di" bpmnElement="Task_1bahewx">
+ <dc:Bounds x="1728" y="123" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p3pyal_di" bpmnElement="SequenceFlow_1p3pyal">
+ <di:waypoint xsi:type="dc:Point" x="1829" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="1877" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="1877" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="1909" y="163" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1892" y="163" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1lztiva_di" bpmnElement="ExclusiveGateway_1lztiva" isMarkerVisible="true">
+ <dc:Bounds x="524" y="147" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="197" width="81" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mpoa26_di" bpmnElement="SequenceFlow_0mpoa26">
+ <di:waypoint xsi:type="dc:Point" x="574" y="172" />
+ <di:waypoint xsi:type="dc:Point" x="786" y="172" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="674" y="147" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05ihl7f_di" bpmnElement="SequenceFlow_05ihl7f">
+ <di:waypoint xsi:type="dc:Point" x="549" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="549" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="61" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="555" y="94" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pirwg0_di" bpmnElement="SequenceFlow_1pirwg0">
+ <di:waypoint xsi:type="dc:Point" x="723" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="61" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="46" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1tber80_di" bpmnElement="Task_0d4mz7a">
+ <dc:Bounds x="623" y="21" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/SetRefactorServiceDecomp.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/SetRefactorServiceDecomp.bpmn
new file mode 100644
index 0000000000..7afac44ff6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/SetRefactorServiceDecomp.bpmn
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2">
+ <bpmn:process id="SetRefactorServiceDecomp" name="SetRefactorServiceDecomp" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_1aizx5q</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1aizx5q" sourceRef="StartEvent_1" targetRef="Task_0gznhje" />
+ <bpmn:endEvent id="EndEvent_1yia7od" name="end">
+ <bpmn:incoming>SequenceFlow_1fypndb</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1ipdcwj" sourceRef="Task_0gznhje" targetRef="CallActivity_0fl1ppe" />
+ <bpmn:serviceTask id="Task_0gznhje" name="Setup ServiceDecomp" camunda:class="org.onap.so.bpmn.infrastructure.DoCreateServiceInstance.SetupServiceDecomp">
+ <bpmn:incoming>SequenceFlow_1aizx5q</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ipdcwj</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:callActivity id="CallActivity_0fl1ppe" name="Call CreateSI" calledElement="CreateServiceInstanceV3">
+ <bpmn:extensionElements>
+ <camunda:in source="ServiceDecomposition" target="ServiceDecomposition" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1ipdcwj</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1fypndb</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1fypndb" sourceRef="CallActivity_0fl1ppe" targetRef="EndEvent_1yia7od" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="SetRefactorServiceDecomp">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="138" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1aizx5q_di" bpmnElement="SequenceFlow_1aizx5q">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="254" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="231.5" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1yia7od_di" bpmnElement="EndEvent_1yia7od">
+ <dc:Bounds x="544" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="553" y="142" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ipdcwj_di" bpmnElement="SequenceFlow_1ipdcwj">
+ <di:waypoint xsi:type="dc:Point" x="354" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="328" y="99" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0kwb6lz_di" bpmnElement="Task_0gznhje">
+ <dc:Bounds x="254" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0fl1ppe_di" bpmnElement="CallActivity_0fl1ppe">
+ <dc:Bounds x="392" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fypndb_di" bpmnElement="SequenceFlow_1fypndb">
+ <di:waypoint xsi:type="dc:Point" x="492" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="544" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="518" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..ae40e9d7c6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,84 @@
+/*-
+ * ============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 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.Before
+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 static org.junit.Assert.assertNotNull
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateCustomE2EServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Test
+ public void testPrepareInitServiceOperationStatus (){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://localhost:28090/dbadapters/RequestsDbAdapter")
+ CreateCustomE2EServiceInstance obj = new CreateCustomE2EServiceInstance();
+ obj.prepareInitServiceOperationStatus(mockExecution)
+ Mockito.verify(mockExecution, times(5)).setVariable(captor.capture(), captor.capture())
+ def updateVolumeGroupRequest = captor.getValue()
+ assertNotNull(updateVolumeGroupRequest);
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateCustomE2EServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateCustomE2EServiceInstance")
+ 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("CreateCustomE2EServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateCustomE2EServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..da0990910a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
@@ -0,0 +1,235 @@
+/*-
+ * ============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.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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateGenericAlaCarteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRESI_"
+ def utils = new MsoUtils()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ String jsonIncomingRequest =
+ """{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1de901ed-17af-4b03-bc1f-41659cfa27cb",
+ "modelVersionId": "ace39141-09ec-4068-b06d-ac6b23bdc6e0",
+ "modelName": "demoVLB",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration" : {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "onap"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "Demonstration",
+ "subscriberName": "Demonstration"
+ },
+ "requestInfo": {
+ "instanceName": "sample-instance-2",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "requestorId":"1234",
+ "suppressRollback": "false"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "vLB"
+ }
+ }
+ }"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ //verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ try{
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ try{
+ // preProcessRequest(DelegateExecution execution)
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.sendSyncResponse(mockExecution)
+
+ //verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("createServiceRestRequest", "202")
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ try{
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.sendSyncError(mockExecution)
+
+ //verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("createServiceRestRequest", "500")
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ 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("CreateGenericALaCarteSeviceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..4d5f506599
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
@@ -0,0 +1,379 @@
+/*-
+ * ============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.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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRENI_"
+ def utils = new MsoUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+String jsonIncomingRequest =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.getNetworkModelInfo(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("CreateNetworkInstanceResponseCode", "202")
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("CreateNetworkInstanceResponseCode", "500")
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestError() {
+
+ println "************ prepareDBRequestError ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("CreateNetworkInstance", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ //when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("networkName")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "createDBRequest", createDBRequestError)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("CreateNetworkInstance", 5300, "Received error from SDN-C: No availability zone available.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ //when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "CRENI_")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.postProcessResponse(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void processRollbackData() {
+
+ println "************ callDBCatalog() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.processRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateNetworkInstance")
+ 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("CreateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
new file mode 100644
index 0000000000..77220da94f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
@@ -0,0 +1,96 @@
+/*-
+ * ============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 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.Before
+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 static org.mockito.Mockito.mock
+import static org.mockito.Mockito.when
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateVfModuleInfraTest {
+
+ def prefix = "CVFMI_"
+ def requestInfo = "<requestInfo><request-id>12345</request-id></requestInfo>"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPrepareUpdateInfraRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "requestInfo")).thenReturn(requestInfo)
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ CreateVfModuleInfra obj = new CreateVfModuleInfra()
+ obj.prepareUpdateInfraRequest(mockExecution)
+ Mockito.verify(mockExecution).setVariable(prefix + "dbAdapterEndpoint", "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+ }
+
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateVfModuleInfra")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateVfModuleInfra")
+ 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("CreateVfModuleInfra")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateVfModuleInfra")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..2b437d875e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,208 @@
+/*-
+ * ============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.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+
+import static org.junit.Assert.assertEquals
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateVfModuleVolumeInfraV1Test extends MsoGroovyTest {
+
+ def jsonRequest = """
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
+"""
+
+ def volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id/>
+ </request-info>
+ <volume-inputs>
+ <volume-group-id/>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <asdc-service-model-version>2.0</asdc-service-model-version>
+ <aic-cloud-region>mdt1</aic-cloud-region>
+ <tenant-id>88a6ca3ee0394ade9403f075db23167e</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="vnf_name">STMTN5MMSC20</param>
+ <param name="vnf_name2">US1117MTSNJVBR0246</param>
+ <param name="vnf_nm_information"/>
+ <param name="vnf_type">pcrf-capacity</param>
+ <param name="vnf_id">skask</param>
+ <param name="vnf_stack_id">slowburn</param>
+ <param name="vnf_status">created</param>
+ <param name="aic_cloud_region">MDTWNJ21</param>
+ <param name="availability_zone">slcp3-esx-az01</param>
+ <param name="oam_network_name">VLAN-OAM-1323</param>
+ <param name="vm_name">slcp34246vbc246ceb</param>
+ <param name="ipag_network_id">970cd2b9-7f09-4a12-af47-182ea38ba1f0</param>
+ <param name="vpe_network_id">545cc2c3-1930-4100-b534-5d82d0e12bb6</param>
+ </volume-params>
+</volume-request>"""
+
+ def completeMsoRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>1234</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+
+ @Test
+ @Ignore
+ public void testPreProcessRequest() {
+
+ ExecutionEntity mockExecution = setupMock('CreateVfModuleVolumeInfraV1')
+
+ when(mockExecution.getVariable("prefix")).thenReturn('CVMVINFRAV1_')
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonRequest)
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn('')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("mso.rollback")).thenReturn('true')
+
+ CreateVfModuleVolumeInfraV1 createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+ createVfModuleVolumeInfraV1.preProcessRequest(mockExecution, 'true')
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(15)).setVariable(captor1.capture(), captor2.capture())
+
+ List<String> arg2List = captor2.getAllValues()
+ String volumeRequestActual = arg2List.get(6)
+ String isVidRequestActual = arg2List.get(8)
+
+ assertEquals(volumeRequestXml, volumeRequestActual.trim())
+ assertEquals('true', isVidRequestActual)
+ }
+
+ @Test
+ public void testPostProcessResponse() {
+
+ ExecutionEntity mockExecution = setupMock('CreateVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("dbReturnCode")).thenReturn('000')
+ when(mockExecution.getVariable("CVMVINFRAV1_createDBResponse")).thenReturn('')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("CVMVINFRAV1_source")).thenReturn('VID')
+
+ CreateVfModuleVolumeInfraV1 createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+ createVfModuleVolumeInfraV1.postProcessResponse(mockExecution, 'true')
+
+ verify(mockExecution).setVariable('CVMVINFRAV1_Success', true)
+ verify(mockExecution).setVariable('CVMVINFRAV1_CompleteMsoProcessRequest', completeMsoRequestXml)
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..95259e9ec0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,148 @@
+/*-
+ * ============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 com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+class DeleteCustomE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteCustomE2EService.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DeleteCustomE2EServiceInstanceTest(){
+ super("DeleteCustomE2EServiceInstance")
+ }
+ @Test
+ public void preProcessRequestTest () {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ mex.setVariable("isDebugLogEnabled","true")
+ instance.preProcessRequest(mex);
+
+ verify(mex).getVariable(GroovyTestBase.DBGFLAG)
+
+ Map<String,String> userParams = new HashMap<>()
+ userParams.put("someUserParam","someValue")
+
+ verify(mex).setVariable("prefix", "DELSI_")
+ verify(mex).setVariable("msoRequestId", "mri")
+ verify(mex).setVariable("source", "CCD")
+ verify(mex).setVariable("operationType", "DELETE")
+ verify(mex).setVariable("globalSubscriberId", "38829939920000")
+ verify(mex).setVariable("serviceInputParams",userParams)
+ }
+
+ @Test
+ public void sendSyncResponseTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.sendSyncResponse(mex)
+ verify(mex).setVariable("DeleteCustomE2EServiceInstanceWorkflowResponseSent", "true")
+ }
+
+ @Test
+ public void prepareCompletionRequestTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.prepareCompletionRequest(mex)
+ String msoComplitionRequest = FileUtil.readResourceFile("__files/GenericFlows/MsoCompletionRequest.xml")
+ //verify(mex).setVariable("completionRequest", msoComplitionRequest)
+ }
+
+ @Test
+ public void sendSyncErrorTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.sendSyncError(mex)
+
+ }
+
+ @Test
+ public void prepareFalloutRequest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.prepareFalloutRequest(mex)
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>null</request-id>
+ <action>DELETE</action>
+ <source>null</source>
+ </request-info>"""
+ //verify(mex).setVariable("falloutRequest", requestInfo)
+ }
+
+ @Test
+ public void processJavaExceptionTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.processJavaException()
+ }
+
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..b459710479
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
@@ -0,0 +1,125 @@
+/*-
+ * ============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.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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DeleteGenericAlaCarteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="DELSI_"
+ def utils = new MsoUtils()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ String jsonIncomingRequest =
+ """{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1de901ed-17af-4b03-bc1f-41659cfa27cb",
+ "modelVersionId": "ace39141-09ec-4068-b06d-ac6b23bdc6e0",
+ "modelName": "demoVLB",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration" : {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "onap"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "Demonstration",
+ "subscriberName": "Demonstration"
+ },
+ "requestInfo": {
+ "instanceName": "sample-instance-2",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "requestorId":"1234",
+ "suppressRollback": "false"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "vLB"
+ }
+ }
+ }"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ try {
+ // preProcessRequest(DelegateExecution execution)
+ DeleteGenericALaCarteServiceInstance deleteGenericALaCarteServiceInstance = new DeleteGenericALaCarteServiceInstance()
+ deleteGenericALaCarteServiceInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+ }catch(Exception e){
+ //ignore
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..9b7d7ee21f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
@@ -0,0 +1,418 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DeleteNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="DELNI_"
+ def utils = new MsoUtils()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ <aetgt:SourceSystemErrorCode>200</aetgt:SourceSystemErrorCode>
+</aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String falloutHandlerRequestObj =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: DELETE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+String deleteDBRequest =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully deleted.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+String deleteDBRequestErrorObj =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+String deleteDBRequestErrorString =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.getNetworkModelInfo(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("DeleteNetworkInstanceResponseCode", "202")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("DeleteNetworkInstanceResponseCode", "500")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // postProcessResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestError() {
+
+ println "************ prepareDBRequestError ************* "
+
+ WorkflowException sndcWorkflowExceptionObj = new WorkflowException("CreateNetworkV2", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowExceptionObj)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteDBRequest", deleteDBRequestErrorObj)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.postProcessResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_FalloutHandlerRequest() {
+
+ println "************ buildErrorResponse ************* "
+
+ WorkflowException sndcWorkflowExceptionObj = new WorkflowException("DeleteNetworkInstance", 7000, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowExceptionObj)
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+
+ // buildErrorResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequestObj)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DeleteNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DeleteNetworkInstance")
+ 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("DeleteNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DeleteNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..0bce32716f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,167 @@
+/*-
+ * ============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.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.core.WorkflowException
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+@RunWith(MockitoJUnitRunner.class)
+class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
+
+ def deleteVnfAdapterRequestXml = """<deleteVolumeGroupRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId/>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>TEST-REQUEST-ID-0123</requestId>
+ <serviceInstanceId>1234</serviceInstanceId>
+ </msoRequest>
+ <messageId>ebb9ef7b-a6a5-40e6-953e-f868f1767677</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/ebb9ef7b-a6a5-40e6-953e-f868f1767677</notificationUrl>
+</deleteVolumeGroupRequest>"""
+
+ def dbRequestXml = """<soapenv:Envelope xmlns:req="http://org.onap.so/requestsdb"
+ xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>TEST-REQUEST-ID-0123</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>VolumeGroup successfully deleted</statusMessage>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs/>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ def completionRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>TEST-REQUEST-ID-0123</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ def falloutHandlerRequestXml = """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>TEST-REQUEST-ID-0123</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>Unexpected Error</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+</aetgt:FalloutHandlerRequest>"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+
+ @Test
+ public void testPrepareVnfAdapterDeleteRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("DELVfModVol_cloudRegion")).thenReturn('RDM2WAGPLCP')
+ when(mockExecution.getVariable("DELVfModVol_tenantId")).thenReturn('fba1bd1e195a404cacb9ce17a9b2b421')
+ when(mockExecution.getVariable("DELVfModVol_volumeGroupId")).thenReturn('78987')
+ when(mockExecution.getVariable("DELVfModVol_volumeGroupHeatStackId")).thenReturn('')
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_serviceId")).thenReturn('1234')
+ when(mockExecution.getVariable("DELVfModVol_messageId")).thenReturn('ebb9ef7b-a6a5-40e6-953e-f868f1767677')
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn('')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareVnfAdapterDeleteRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_deleteVnfARequest", deleteVnfAdapterRequestXml)
+
+ }
+
+ @Test
+ //@Ignore
+ public void testPrepareDbRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_volumeOutputs")).thenReturn('')
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareDBRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_updateInfraRequest", dbRequestXml)
+ }
+
+ @Test
+ public void testPrepareCompletionHandlerRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareCompletionHandlerRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_CompleteMsoProcessRequest", completionRequestXml)
+ }
+
+ @Test
+ public void testPrepareFalloutHandler() {
+
+ WorkflowException workflowException = new WorkflowException('DeleteVfModuleVolumeInfraV1', 5000, 'Unexpected Error')
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareFalloutHandler(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_Success", false)
+ verify(mockExecution).setVariable("DELVfModVol_FalloutHandlerRequest", falloutHandlerRequestXml)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..72f79c80d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.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.Before
+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.common.scripts.utils.XmlComparator
+
+import static org.mockito.Mockito.*
+/**
+ * @author sushilma
+ * @since January 10, 2018
+ */
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateE2EServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ String expectedServiceInstanceData = """ <service-instance xmlns="http://org.openecomp.aai.inventory/v8">
+ <service-instance-id>1234</service-instance-id>
+ <service-instance-name>volte-service</service-instance-name>
+ <service-type>voLTE type</service-type>
+ <service-role>voLTE role</service-role>
+ <orchestration-status>Created</orchestration-status>
+ <model-invariant-id>c1d4305f-cdbd-4bbe-9069-a2f4978fd89e</model-invariant-id>
+ <model-version-id>d4df5c27-98a1-4812-a8aa-c17f055b7a3f</model-version-id>
+ </service-instance>"""
+ @Test
+ public void testPreProcessRequest(){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceType")).thenReturn("TRANSPORT")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("1234")
+ when(mockExecution.getVariable("serviceInstanceName")).thenReturn("volte-service")
+ when(mockExecution.getVariable("uuiRequest")).thenReturn("""{"service":{"serviceDefId":"c1d4305f-cdbd-4bbe-9069-a2f4978fd89e" , "templateId" : "d4df5c27-98a1-4812-a8aa-c17f055b7a3f"}}""")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("mso.workflow.default.aai.customer.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn('/aai/v8/business/customers/customer')
+ DoCreateE2EServiceInstance obj = new DoCreateE2EServiceInstance()
+ obj.preProcessRequest(mockExecution)
+ Mockito.verify(mockExecution, times(7)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(expectedServiceInstanceData, captor.getValue())
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateE2EServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateE2EServiceInstance")
+ 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("DoCreateE2EServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateE2EServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..5ee10bc931
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,369 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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.impl.pvm.process.ProcessDefinitionImpl
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.onap.so.bpmn.mock.StubResponseNetworkAdapter.MockNetworkAdapterRestRollbackDelete;
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+ String Prefix="CRENWKIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+ verify(mockExecution).setVariable(Prefix + "networkId", "")
+ verify(mockExecution).setVariable(Prefix + "urlRollbackPoNetwork", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:28090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:28090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callPONetworkAdapter() {
+
+ MockNetworkAdapterRestRollbackDelete("deleteNetworkResponse_Success.xml","8abc633a-810b-4ca5-8b3a-09511d13a2ce");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn( rollbackNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.callPONetworkAdapter(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "urlRollbackPoNetwork", "http://localhost:28090/networks/NetworkAdapter/8abc633a-810b-4ca5-8b3a-09511d13a2ce/rollback")
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoCreateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC activate rollback completed. + PO Network rollback completed. + SNDC assign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "workflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateNetworkInstanceRollback")
+ 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("DoCreateNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..0a1f8f2859
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
@@ -0,0 +1,4324 @@
+/*-
+ * ============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.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByName;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByName_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutNetworkIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkTableReference;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding;
+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.camunda.bpm.engine.delegate.DelegateExecution
+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.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="CRENWKI_"
+
+// ---- Start XML Zone ----
+ String xmlIncomingRequest =
+ """<rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</request-id>
+ <action>CREATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param xmlns="" name="shared">1</param>
+ <param xmlns="" name="external">0</param>
+ </network-params>
+ </network-request>
+ </rest:payload>"""
+
+ String expectedXMLNetworkRequest =
+"""<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1"
+ contentType="text/xml">
+ <network-request>
+ <request-info>
+ <request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</request-id>
+ <action>CREATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String expectedXMLNetworkInputs =
+"""<network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+</network-inputs>"""
+
+ String networkXMLOutputs =
+""""""
+
+// ---- End XML Zone ----
+
+// ---- Start JSON Zone ----
+ // JSON format Input
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ String expectedJSONNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>null</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+ String expectedJSONNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String networkJSONOutputs =
+"""<network-outputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+// ---- End JSON Zone ----
+
+// ---- Start vPIR Zone ----
+ // expectedNetworkRequest
+ String expectedvIPRNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expectedvIPRNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+ String networkvIPROutputs =
+"""<network-outputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+// ---- End vPIR Zone ----
+
+ String vnfRequestFakeRegion =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>CREATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <subscriptionServiceType>MSO-dev-service-type</subscriptionServiceType>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest_Outputs =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>CREATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <subscriptionServiceType>MSO-dev-service-type</subscriptionServiceType>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+
+ // expectedNetworkRequest
+ String networkInputs_404 =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name>myOwn_Network</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <subnet-role>ECOMP</subnet-role>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_AlaCarte =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_segmentation =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-assignment>
+ <segmentation-id>1</segmentation-id>
+ <resource-version>1498507569188</resource-version>
+ </segmentation-assignment>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_Ipv4 =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>ipv4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>ipv4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_SRIOV =
+"""<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>6cb1ae5a-d2db-4eb6-97bf-d52a506a53d8</network-id>
+ <network-name>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17</network-name>
+ <network-type>SR_IOV_Provider2_1</network-type>
+ <network-role>HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1</network-role>
+ <network-technology>AIC_SR_IOV</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id/>
+ <resource-version>1487336177672</resource-version>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <persona-model-id>f70d7a32-0ac8-4bd5-a0fb-3c9336540d78</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <physical-network-name>Physnet21</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>false</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>10437</subnet-id>
+ <subnet-name>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17_S0</subnet-name>
+ <gateway-address>192.168.6.1</gateway-address>
+ <network-start-address>192.168.6.0</network-start-address>
+ <cidr-mask>26</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>192.168.6.3</dhcp-start>
+ <dhcp-end>192.168.6.62</dhcp-end>
+ <resource-version>1487336177359</resource-version>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn16/tenants/tenant/6accefef3cb442ff9e644d589fb04107</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn16</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>6accefef3cb442ff9e644d589fb04107</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSO_TEST_1702_A</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn16</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn16</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>lcp</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_ST/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/51d8336b-a993-4afe-a5fc-10b3afbd6560</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_ST</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>51d8336b-a993-4afe-a5fc-10b3afbd6560</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>HnportalProviderNetwork_17</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseTestScenario01 =
+ """<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
+ <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
+ <network-name>GN_EVPN_direct_net_0_ST1</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1465398611</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
+ <gateway-address>108.239.40.1</gateway-address>
+ <network-start-address>108.239.40.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>108.239.40.0</dhcp-start>
+ <dhcp-end>108.239.40.0</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ <subnet>
+ <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
+ <gateway-address>2606:ae00:2e01:604::1</gateway-address>
+ <network-start-address>2606:ae00:2e01:604::</network-start-address>
+ <cidr-mask>64</cidr-mask>
+ <ip-version>6</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
+ <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ </subnets>
+ <ctag-assignments />
+ <segmentation-assignments>
+ <segmentation-id>416</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
+ </related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value></property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
+ </relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>Ruchira Contrail 3.0 test</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>GN_EVPN_direct_net_0_ST1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list/>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryNameAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String queryNameAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String aaiVpnResponseStub =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://org.openecomp.aai.inventory/v8"
+ contentType="text/xml">
+ <vpn-binding>
+ <global-route-target/>
+ </vpn-binding>
+</rest:payload>"""
+
+ String queryVpnBindingAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <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/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</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/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</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/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String createDBRequestError01 =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error unexpectedly from SDN-C.</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String createDBRequest_Outputs =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully created.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;networkId&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>networkId</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String createNetworkRequest =
+ """<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>192.10.16.0/24</prefix>
+ <nextHop>192.10.16.100/24</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.110.17.0/24</prefix>
+ <nextHop>192.110.17.110/24</nextHop>
+ </hostRoutes>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>192.10.16.0/24</prefix>
+ <nextHop>192.10.16.100/24</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequest_Ipv4 =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequestAlaCarte =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <some_user_param1>someValue1</some_user_param1>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequest_SRIOV =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>6cb1ae5a-d2db-4eb6-97bf-d52a506a53d8</networkId>
+ <networkName>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>AIC_SR_IOV</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>Physnet21</physicalNetworkName>
+ <vlans/>
+ </providerVlanNetwork>
+ <subnets>
+ <allocationPools>
+ <start>192.168.6.3</start>
+ <end>192.168.6.62</end>
+ </allocationPools>
+ <cidr>192.168.6.0/26</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>192.168.6.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>10437</subnetId>
+ <subnetName>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17_S0</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+ String createNetworkRequest_noPhysicalName =
+ """<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>null</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+ String createNetworkResponseREST =
+ """<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <networkStackId></networkStackId>
+ <networkCreated>true</networkCreated>
+ <subnetMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetMap>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ <messageId>messageId_generated</messageId>
+</ns2:createNetworkResponse>"""
+
+ String createRollbackNetworkRequest =
+ """<rollbackNetworkRequest>
+ <networkRollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </networkRollback>
+</rollbackNetworkRequest>"""
+
+ String createNetworkResponse =
+ """<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:createNetworkResponse>"""
+
+ String updateContrailAAIPayloadRequest =
+ """<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-role>ECOMP</subnet-role>
+ <resource-version>1505857301954</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <resource-version>1505857301954</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+String updateContrailAAIPayloadRequest_segmentation =
+"""<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-assignment>
+ <segmentation-id>1</segmentation-id>
+ <resource-version>1498507569188</resource-version>
+ </segmentation-assignment>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String updateContrailAAIResponse =
+ """<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>"""
+
+ String createNetworkErrorResponse =
+ """<createNetworkError>
+ <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+ <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+ <rolledBack>true</rolledBack>
+ </createNetworkError>"""
+
+
+ String networkException500 =
+ """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.onap.so/network", the namespace on the "createNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String assignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignSDNCRequest_decodeUrlLink =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>VIRTUAL USP</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignRpcSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String activateSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="com:att:sdnctl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncRollbackRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String sdncRpcRollbackRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String sdncActivateRollbackRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactivate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+
+ String sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="com:att:sdnctl:vnf">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="com:att:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String sdncAdapterWorkflowAssignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:CallbackHeader>
+ <tag0:RequestId>79ec9006-3695-4fcc-93a8-be6f9e248beb</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+ </tag0:CallbackHeader>
+ <tag0:RequestData xsi:type="xs:string">
+ <output xmlns="org:onap:sdnc:northbound:generic-resource">
+ <response-message/>
+ <svc-request-id>79ec9006-3695-4fcc-93a8-be6f9e248beb</svc-request-id>
+ <service-response-information>
+ <instance-id>f805ec2b-b4d8-473e-8325-67f110139e5d</instance-id>
+ </service-response-information>
+ <response-code>200</response-code>
+ <network-response-information>
+ <instance-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</instance-id>
+ <object-path>restconf/config/GENERIC-RESOURCE-API:services/service/f805ec2b-b4d8-473e-8325-67f110139e5d/service-data/networks/network/f7e4db56-aab5-4065-8e65-cec1cd1de24f</object-path>
+ </network-response-information>
+ <ack-final-indicator>Y</ack-final-indicator>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String rollbackNetworkRequest =
+"""<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", null)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "messageId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","")
+ verify(mockExecution).setVariable("GENGS_type","")
+ verify(mockExecution).setVariable(Prefix + "rsrc_endpoint", null)
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ // AAI query Name
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isAAIqueryNameGood", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", null)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 0)
+ verify(mockExecution).setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 0)
+ verify(mockExecution).setVariable(Prefix + "tableRefCollection", "")
+
+ // AAI requery Id
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "createNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "assignSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "activateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "activateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncActivateReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncActivateRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncActivateResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "orchestrationStatus", "")
+ verify(mockExecution).setVariable(Prefix + "isVnfBindingPresent", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vIPR_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ def serviceModelInfo = """{"modelUuid": "36a3a8ea-49a6-4ac8-b06c-89a54544b9b6",
+ "modelName": "HNGW Protected OAM",
+ "modelType": "service",
+ "modelVersion": "1.0",
+ "modelInvariantUuid": "fcc85cb0-ad74-45d7-a5a1-17c8744fdb71"
+ }""".trim()
+
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("serviceModelInfo")).thenReturn(serviceModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("CREATE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedvIPRNetworkRequest)
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedvIPRNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution, atLeast(1)).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution, atLeast(1)).setVariable("msoRequestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkvIPROutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_JSON_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ // when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("requestAction")).thenReturn("CREATE")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId") // optional
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest) // JSON format
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610") // 1610 default
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedJSONNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedJSONNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution, atLeast(1)).setVariable("msoRequestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkJSONOutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_XML_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ // when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(xmlIncomingRequest) // XML format
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedXMLNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", true)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedXMLNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "PORTAL")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","MNS-25180-L-01-dmz_direct_net_1")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkXMLOutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_Ipv4() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_Ipv4)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest_Ipv4)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_AlaCarte() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedJSONNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_AlaCarte)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequestAlaCarte)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_SRIOV() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_SRIOV)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest_SRIOV)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest_decodeUrlLink() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignSDNCRequest_decodeUrlLink)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRequest() {
+
+ println "************ prepareRpcSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignRpcSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRequest() {
+
+ println "************ prepareRpcSDNCActivateRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "activateSDNCRequest", activateSDNCRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRollbackRequest() {
+
+ println "************ prepareRpcSDNCRollbackRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRpcRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRollback() {
+
+ println "************ prepareRpcSDNCActivateRollback ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "activateSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", sdncActivateRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkName_200() {
+
+ println "************ callRESTQueryAAINetworkName ************* "
+
+ WireMock.reset();
+ MockGetNetworkByName("MNS-25180-L-01-dmz_direct_net_1", "CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(networkInputs)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkName(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest", "http://localhost:8090/aai/v8/network/l3-networks/l3-network?network-name=MNS-25180-L-01-dmz_direct_net_1")
+
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "orchestrationStatus", "PENDING-CREATE")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkName_404() {
+
+ println "************ callRESTQueryAAINetworkName ************* "
+
+ WireMock.reset();
+ MockGetNetworkByName_404("CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml", "myOwn_Network");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(networkInputs_404)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkName(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest", "http://localhost:8090/aai/v8/network/l3-networks/l3-network?network-name=myOwn_Network")
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "404")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowAssignResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBindingList_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 1)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network-policy.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 1)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest", "http://localhost:8090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkTableReference("CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", "refFQDN1");
+ MockGetNetworkTableReference("CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", "refFQDN2");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network-table-reference.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network-table-reference.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.route-table-reference.uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 2)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest", "http://localhost:8090/aai/v8/network/route-table-references/route-table-reference/refFQDN1?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.l3-network.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ //old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("false")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200_segmentation() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse_segmentation)
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("false")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest_segmentation)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void validateCreateNetworkResponseREST() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.validateCreateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "createNetworkResponse", createNetworkResponseREST)
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", createRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateCreateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('500')
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateCreateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse() {
+
+ println "************ validateSDNCResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_Error() {
+
+ println "************ validateSDNCResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from SNDC Adapter: HTTP Status 500.")
+
+ //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ //verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRpcSDNCActivateResponse() {
+
+ println "************ validateRpcSDNCActivateResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "activateSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncActivateReturnCode")).thenReturn("200")
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateRpcSDNCActivateResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncActivateRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn(rollbackActivateSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackNetworkRequest)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("testProcessKey")).thenReturn("DoCreateNetworkInstanceTest")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(sdncRpcRollbackRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn(sdncActivateRollbackRequest)
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.postProcessResponse(mockExecution)
+
+// verify(mockExecution,atLeastOnce()).getVariable("isDebugLogEnabled")
+ verify(mockExecution,atLeastOnce()).setVariable("prefix", Prefix)
+ verify(mockExecution,atLeastOnce()).setVariable(Prefix + "Success", true)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateNetworkInstance")
+ 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("DoCreateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
new file mode 100644
index 0000000000..cc6f89865f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
@@ -0,0 +1,135 @@
+/*-
+ * ============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 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.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 org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.ServiceInstance
+import org.onap.so.bpmn.mock.StubResponseAAI
+
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateServiceInstanceTest {
+ def prefix = "DCRESI_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_dev")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("sdnc.si.svc.types")).thenReturn("PORT-MIRROR,PPROBES")
+
+ ServiceDecomposition decomposition = new ServiceDecomposition()
+ ModelInfo modelInfo = new ModelInfo()
+ ServiceInstance instance = new ServiceInstance()
+ instance.instanceId = "12345"
+ decomposition.modelInfo = modelInfo
+ decomposition.serviceInstance = instance
+
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(decomposition)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("mso.workflow.default.aai.customer.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn('/aai/v8/business/customers/customer')
+
+
+ DoCreateServiceInstance obj = new DoCreateServiceInstance()
+ obj.preProcessRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", prefix)
+ verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:28080/mso/SDNCAdapterCallbackService")
+ }
+
+
+
+ @Test
+ void testGetAAICustomerById() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn("/aai/v9/business/customers/customer")
+ 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.custom.DoCreateServiceInstance.aai.version")).thenReturn('8')
+ StubResponseAAI.MockGetCustomer("12345", "")
+ DoCreateServiceInstance obj = new DoCreateServiceInstance()
+ obj.getAAICustomerById(mockExecution)
+
+ verify(mockExecution, times(1)).getVariable("aai.endpoint")
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateServiceInstance")
+ 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("DoCreateServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
new file mode 100644
index 0000000000..6d9d5e5356
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
@@ -0,0 +1,106 @@
+/*-
+ * ============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 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.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.mockito.Mockito.mock
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+/**
+ * @author sushilma
+ * @since January 10, 2018
+ */
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVFCNetworkServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Test
+ public void testAddNSRelationship(){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("nsInstanceId")).thenReturn("NS12345")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_dev")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("serviceId")).thenReturn("SER12345")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ MockPutServiceInstance("MSO_dev", "MSO-dev-service-type", "SER12345");
+ DoCreateVFCNetworkServiceInstance DoCreateVFCNetworkServiceInstance = new DoCreateVFCNetworkServiceInstance()
+ DoCreateVFCNetworkServiceInstance.addNSRelationship(mockExecution);
+ verify(mockExecution, times(1)).getVariable("aai.endpoint")
+ verify(mockExecution, times(1)).getVariable("mso.msoKey")
+ verify(mockExecution, times(1)).getVariable("aai.auth")
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ 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("DoCreateVFCNetworkServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+
+ public static void MockPutServiceInstance(String globalCustId, String subscriptionType, String serviceInstanceId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId+"/relationship-list/relationship"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml").withBody("")
+ ));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
new file mode 100644
index 0000000000..c5c6187648
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
@@ -0,0 +1,202 @@
+/*-
+ * ============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 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.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.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleRollbackTest {
+
+ def prefix = "DCVFMR_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPrepSDNCAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable(prefix + "source")).thenReturn("VID")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+
+ when(mockExecution.getVariable(prefix + "rollbackSDNCRequestActivate")).thenReturn("true")
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ obj.prepSDNCAdapterRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue())
+ }
+
+
+
+ @Test
+ void testBuildSDNCRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable(prefix + "source")).thenReturn("VID")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+
+ when(mockExecution.getVariable(prefix + "rollbackSDNCRequestActivate")).thenReturn("true")
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ String sdncRequest = obj.buildSDNCRequest(mockExecution, "svcInstId_test", "deactivate")
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, sdncRequest)
+ }
+
+
+
+ @Test
+ void testPrepVNFAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "mso-request-id")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:18080/mso/WorkflowMessage/')
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ String sdncRequest = obj.prepVNFAdapterRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml")
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModuleRollback.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoCreateVfModuleRollback.aai.version")).thenReturn("8")
+ 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("rollbackData")).thenReturn(new RollbackData())
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable(prefix + "createdNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "networkPolicyFqdnCount", 1)
+ Mockito.verify(mockExecution).setVariable(prefix + "aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVfModuleRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVfModuleRollback")
+ 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("DoCreateVfModuleRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVfModuleRollback")
+ 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/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
new file mode 100644
index 0000000000..30e3779b53
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
@@ -0,0 +1,229 @@
+/*-
+ * ============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 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.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.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleTest {
+ def prefix = "DCVFM_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleResponseCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIVfModuleForStatus() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_vfModuleName")).thenReturn("module-0")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModuleForStatus(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DCVFM_orchestrationStatus", '')
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleForStatusResponseCode", 200)
+ }
+
+
+
+ @Test
+ void testPreProcessVNFAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable("volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "vfModuleIndex")).thenReturn("index")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "backoutOnFailure")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "asdcServiceModelVersion")).thenReturn("1.0")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+ when(mockExecution.getVariable("baseVfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "baseVfModuleHeatStackId")).thenReturn("12345")
+ String sdncGetResponse = FileUtil.readResourceFile("__files/DoCreateVfModule/sdncGetResponse.xml");
+ when(mockExecution.getVariable(prefix + "getSDNCAdapterResponse")).thenReturn(sdncGetResponse)
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable("vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.preProcessVNFAdapterRequest(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoCreateVfModule/createVnfARequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+ @Test
+ void testQueryCloudRegion() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryCloudRegion(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/12345")
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionReturnCode", "200")
+ }
+
+
+
+ @Test
+ void testCreateNetworkPoliciesInAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoCreateVfModule.aai.version")).thenReturn("8")
+ 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("rollbackData")).thenReturn(new RollbackData())
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DCVFM_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.createNetworkPoliciesInAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "networkPolicyFqdnCount", 1)
+ Mockito.verify(mockExecution).setVariable(prefix + "aaiQqueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+
+ 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/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/getGenericVnfResponse.xml")))
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module[?]vf-module-name=module-0"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/getGenericVnfResponse.xml")))
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/12345"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/cloudRegion_AAIResponse_Success.xml")))
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
new file mode 100644
index 0000000000..91e7086bd3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
@@ -0,0 +1,135 @@
+/*-
+ * ============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.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+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.common.scripts.MsoGroovyTest
+
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertNotNull
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.when
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleVolumeV2Test extends MsoGroovyTest {
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ def String volumeRollbackRequest = """
+<rollbackVolumeGroupRequest>
+ <volumeGroupRollback>
+ <volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
+ <volumeGroupStackId>{{VOLUMEGROUPSTACKID}}</volumeGroupStackId>
+ <tenantId>c2141e3fcae940fcb4797ec9115e5a7a</tenantId>
+ <cloudSiteId>mtwnj1a</cloudSiteId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5</requestId>
+ <serviceInstanceId>88c871d6-be09-4982-8490-96b1d243fb34</serviceInstanceId>
+ </msoRequest>
+ <messageId>9a5a91e8-3b79-463c-81c3-874a78f5b567</messageId>
+ </volumeGroupRollback>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567</notificationUrl>
+</rollbackVolumeGroupRequest>
+ """
+
+ def String volumeRollbackRequestWithStackId = """
+<rollbackVolumeGroupRequest>
+ <volumeGroupRollback>
+ <volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
+ <volumeGroupStackId>mdt22avrr_volume01/0f1aaae8-efe3-45ce-83e1-bfad01db58d8</volumeGroupStackId>
+ <tenantId>c2141e3fcae940fcb4797ec9115e5a7a</tenantId>
+ <cloudSiteId>mtwnj1a</cloudSiteId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5</requestId>
+ <serviceInstanceId>88c871d6-be09-4982-8490-96b1d243fb34</serviceInstanceId>
+ </msoRequest>
+ <messageId>9a5a91e8-3b79-463c-81c3-874a78f5b567</messageId>
+ </volumeGroupRollback>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567</notificationUrl>
+</rollbackVolumeGroupRequest>
+ """
+
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ public void testBuildRollbackVolumeGroupRequestXml() {
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ String xml = process.buildRollbackVolumeGroupRequestXml(
+ "171907d6-cdf0-4e08-953d-81ee104005a7", // volumeGroupId
+ "mtwnj1a", // cloudSiteId
+ "c2141e3fcae940fcb4797ec9115e5a7a", // tenantId
+ "230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5", // requestId
+ "88c871d6-be09-4982-8490-96b1d243fb34", // serviceInstanceId
+ "9a5a91e8-3b79-463c-81c3-874a78f5b567", // messageId
+ "http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567") // notificationUrl
+
+ assertEquals(volumeRollbackRequest.replaceAll("\\s", ""), xml.replaceAll("\\s", ""))
+ }
+
+
+ @Test
+ public void testUpdateRollbackVolumeGroupRequestXml() {
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ String updatedXml = process.updateRollbackVolumeGroupRequestXml(volumeRollbackRequest, "mdt22avrr_volume01/0f1aaae8-efe3-45ce-83e1-bfad01db58d8")
+ assertEquals(volumeRollbackRequestWithStackId.replaceAll("\\s", ""), updatedXml.replaceAll("\\s", ""))
+ }
+
+ @Test
+ public void testPrepareVnfAdapterCreateRequest (){
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV2')
+
+ when(mockExecution.getVariable("prefix")).thenReturn('DCVFMODVOLV2_')
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn('')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn('1234')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+ Map vfModuleInputParams = new HashMap()
+ vfModuleInputParams.put("param1","value1")
+ when(mockExecution.getVariable("vfModuleInputParams")).thenReturn(vfModuleInputParams)
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ process.prepareVnfAdapterCreateRequest(mockExecution,"true");
+ Mockito.verify(mockExecution,times(2)).setVariable(captor.capture(), captor.capture())
+ String DCVFMODVOLV2_createVnfARequest = captor.getValue();
+ assertNotNull(DCVFMODVOLV2_createVnfARequest)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
new file mode 100644
index 0000000000..9b421d8b63
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
@@ -0,0 +1,106 @@
+/*-
+ * ============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 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.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 org.onap.so.bpmn.core.domain.VnfResource
+
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVnfTest {
+ def prefix = "DoCVNF_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable("vnfName")).thenReturn("skask-test")
+
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+
+ when(mockExecution.getVariable("vnfResourceDecomposition")).thenReturn(new VnfResource())
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+
+
+
+ DoCreateVnf obj = new DoCreateVnf()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(31)).setVariable(captor.capture(), captor.capture())
+ List list = captor.getAllValues()
+ String str = list.get(51)
+ Assert.assertEquals("http://localhost:28080/mso/SDNCAdapterCallbackService", str)
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVnf")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVnf")
+ 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("DoCreateVnf")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVnf")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..bbbb82b5aa
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
@@ -0,0 +1,169 @@
+/*-
+ * ============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 com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.infrastructure.scripts.DoCustomDeleteE2EServiceInstance
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy
+import static org.mockito.Matchers.anyString
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.eq
+
+class DoCustomDeleteE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteCustomE2EService.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+ public DoCustomDeleteE2EServiceInstanceTest(){
+ super("DoCustomDeleteE2EServiceInstance")
+ }
+
+ @Test
+ public void preProcessRequestTest(){
+
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preProcessRequest(mex)
+ verify(mex).setVariable("sdncCallbackUrl", "/mso/sdncadapter/")
+ verify(mex).setVariable("siParamsXml", "")
+ }
+
+ @Test
+ public void postProcessAAIGETSuccessTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENGS_SuccessIndicator")).thenReturn(true)
+
+ String aaiGetResponse = FileUtil.readResourceFile("__files/GenericFlows/aaiGetResponse.xml")
+ when(mex.getVariable("GENGS_service")).thenReturn(aaiGetResponse)
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIGET(mex)
+
+ verify(mex).setVariable(eq("serviceRelationShip"), anyString())
+ }
+
+ @Test
+ public void postProcessAAIGETFailureTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(false)
+ when(mex.getVariable("GENGS_SuccessIndicator")).thenReturn(false)
+
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ assertThatThrownBy { instance.postProcessAAIGET(mex) } isInstanceOf BpmnError.class
+ }
+
+ @Test
+ public void preInitResourcesOperStatusTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preInitResourcesOperStatus(mex)
+
+ verify(mex).setVariable(eq("CVFMI_initResOperStatusRequest"), anyString())
+ }
+
+ @Test
+ public void preResourceDeleteTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preResourceDelete(mex,"overlay")
+ verify(mex).setVariable("resourceType", "overlay")
+ }
+
+ @Test
+ public void postProcessSDNCDeleteTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn("true")
+ when(mex.getVariable("DDELSI_sdncResponseSuccess")).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn("DDELSI_")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ String response = FileUtil.readResourceFile("__files/GenericFlows/SDNCDeleteResponse.xml")
+ String method = "deleteE2E";
+ instance.postProcessSDNCDelete(mex, response, method)
+ // following method doesn't do anything currently -> nothing to check
+ }
+
+ @Test
+ public void postProcessAAIDELTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENDS_SuccessIndicator")).thenReturn("true")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIDEL(mex)
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn("true")
+ when(mex.getVariable("GENGS_siResourceLink")).thenReturn("/service-subscription/e2eserviceInstance/delete/service-instances/")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+ when(mex.getVariable("GENGS_service")).thenReturn("test3434")
+ when(mex.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://localhost:8080/mso")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..5e264c0af4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,343 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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.impl.pvm.process.ProcessDefinitionImpl
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="DELNWKIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackDeActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackDeactivateSDNCRequest", rollbackDeActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoDeleteNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoDeleteNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC deactivate rollback completed. + PO Network rollback completed. + SNDC unassign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackDeactivateSDNCRequest", rollbackDeActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteNetworkInstanceRollback")
+ 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("DoDeleteNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..1a2d16d9d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
@@ -0,0 +1,1948 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+import static org.onap.so.bpmn.mock.StubResponseNetworkAdapter.MockNetworkAdapter;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+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.camunda.bpm.engine.delegate.DelegateExecution
+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.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="DELNWKI_"
+
+ String incomingJsonRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ String expectedDoDeleteNetworkInstanceRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ // expectedVnfRequest
+ String expectedNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expectedVperNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expected_networkInput =
+ """<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String expectedVper_networkInput =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+// emptyRegionVnfRequest
+String emptyRegionVnfRequest =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+</network-request>"""
+
+String vnfRequestCloudRegionNotFound =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+</network-request>"""
+
+ String vnfPayload =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ <network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String vnfPayload_MissingId =
+"""<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ <network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name/>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String vnfRequestRESTPayload =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-outputs>
+ <network-id>id</network-id>
+ <network-name>name</network-name>
+ </network-outputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>"""
+
+
+String incomingRequestMissingCloudRegion =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ String expectedNetworkRequestMissingId =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id/>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ // vnfRESTRequest
+ String vnfRESTRequest =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ statusCode="200">
+ <rest:payload contentType="text/xml">
+ <network-request>
+ <request-info>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <userParams/>
+ </network-params>
+ </network-request>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+String networkInputsNoType =
+"""<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id></network-id>
+ <network-name></network-name>
+ <network-type></network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String networkInputsMissingId =
+ """<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id/>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+String networkInputsMissingCloudRegion =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String MissingIdFault = "Invalid value or missing network-id element"
+ String MissingRegionFault = "Invalid value or missing 'aic-cloud-region' element"
+
+ String invalidWorkflowException = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Invalid value of network-id element</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String deleteNetworkRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <NetworkAdapter:deleteNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <networkId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkId>
+ <request>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>0</serviceInstanceId>
+ </request>
+ </NetworkAdapter:deleteNetwork>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+String deleteNetworkRESTRequest =
+"""<deleteNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkId>bdc5efe8-404a-409b-85f6-0dcc9eebae30</networkId>
+ <networkStackId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkStackId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_value</messageId>
+ <notificationUrl/>
+</deleteNetworkRequest>"""
+
+String deleteNetworkRESTRequestAlaCarte =
+"""<deleteNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkId>bdc5efe8-404a-409b-85f6-0dcc9eebae30</networkId>
+ <networkStackId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkStackId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <modelCustomizationUuid>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_value</messageId>
+ <notificationUrl/>
+</deleteNetworkRequest>"""
+
+ String deleteNetworkResponse_noRollback =
+"""<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+</ns2:deleteNetworkResponse>
+"""
+
+ String deleteNetworkResponse =
+ """<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ </ns2:deleteNetworkResponse>"""
+
+ String deleteRollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String deleteNetworkResponseFalseCompletion =
+ """<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkDeleted>false</networkDeleted>
+ </ns2:deleteNetworkResponse>"""
+
+ String deleteNetworkErrorResponse =
+ """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</deleteNetworkError>
+"""
+
+ String deleteNetworkWorkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from Network Adapter: 400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7020</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+String aaiWorkflowException =
+"""<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Bpmn error encountered in DoDeleteNetworkInstance flow. Unexpected Response from AAI Adapter - org.apache.http.conn.HttpHostConnectException: Connect to localhost:8090 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>RDM2WAGPLCP</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String aaiResponseWithRelationship =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://aai-app-e2e.ecomp.cci.com:8443/aai/v8/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>105df7e5-0b3b-49f7-a837-4864b62827c4</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>d9217058-95a0-49ee-b9a9-949259e89349</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/45f822d9-73ca-4255-9844-7cef401bbf47/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>45f822d9-73ca-4255-9844-7cef401bbf47</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>zrdm1scpx05</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String deleteSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DisconnectNetworkRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type/>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name/>
+ </service-information>
+ <network-request-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-name>HSL_direct_net_2</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String deleteRpcSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name/>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapaterDeactivateRollback =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name/>
+ </service-information>
+ <network-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+ </aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowResponse_404 =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;404&lt;/response-code&gt;&lt;response-message&gt;Service instance not found in config tree&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowFormattedResponse_404 =
+"""<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>404</response-code>
+ <response-message>Service instance not found in config tree</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>19174929-3809-49ca-89eb-17f84a035389</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>HSL_direct_net_2</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String sdncAdapterWorkflowFormattedResponse_404 =
+"""<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>404</response-code>
+ <response-message>Service instance not found in config tree</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String invalidRequest = "Invalid value of network-id element"
+
+
+
+ String sndcWorkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ <aetgt:SourceSystemErrorCode>200</aetgt:SourceSystemErrorCode>
+</aetgt:WorkflowException>"""
+
+ String sndcWorkflowErrorResponse =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: <aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;404&lt;/response-code&gt;&lt;response-message&gt;Service instance not found in config tree&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse></aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ String unexpectedErrorEncountered =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>bpel error deleting network</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+
+ // expectedVnfRequest
+ String inputViprSDC_NetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <modelType>CONTRAIL_EXTERNAL</modelType>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ <modelType>service</modelType>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingJsonRequest)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequest)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expected_networkInput)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vPER() {
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("DELETE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedVperNetworkRequest)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedVper_networkInput)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "lcpCloudRegion", "")
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ verify(mockExecution).setVariable(Prefix + "tenantId", "")
+
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", false)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "deactivateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deactivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "deactivateSdncReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncDeactivateRollbackNeeded", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json_MissingId() {
+
+ println "************ preProcessRequest_MissingId() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ //when(mockExecution.getVariable("networkId")).thenReturn("") // missing Id
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingJsonRequest)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingId)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", networkInputsMissingId)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json_MissingCloudRegion() {
+
+ def networkModelInfo = """{"modelVersionId": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationId": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantId": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingRequestMissingCloudRegion)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", networkInputsMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "lcpCloudRegion", null)
+
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO","Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void prepareNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedVperNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(queryAAIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "tenantId")).thenReturn("e81d842d3e8b45c5a59f57cd76af3aaf")
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_value")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareNetworkRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("mso.adapters.network.rest.endpoint", "http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRESTRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareNetworkRequest_AlaCarte() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(queryAAIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "tenantId")).thenReturn("e81d842d3e8b45c5a59f57cd76af3aaf")
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_value")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareNetworkRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("mso.adapters.network.rest.endpoint", "http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRequest)
+ verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRESTRequestAlaCarte)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendRequestToVnfAdapter() {
+
+ println "************ sendRequestToVnfAdapter ************* "
+
+ WireMock.reset();
+ MockNetworkAdapter("bdc5efe8-404a-409b-85f6-0dcc9eebae30", 200, "deleteNetworkResponse_Success.xml");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "deleteNetworkRequest")).thenReturn(deleteNetworkRESTRequest)
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("BasicAuthHeaderValuePO")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.sendRequestToVnfAdapter(mockExecution)
+
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", 200)
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkResponse", deleteNetworkResponse_noRollback)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(aaiResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", deleteSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRequest() {
+
+ println "************ prepareRpcSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(inputViprSDC_NetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRpcSDNCRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", deleteRpcSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRollback() {
+
+ println "************ prepareRpcSDNCActivateRollback ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(inputViprSDC_NetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", sdncAdapaterDeactivateRollback)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_200() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_withRelationship_200() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponseWithRelationship)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_200_DefaultUri() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+ "?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegion_NotFound ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestCloudRegionNotFound)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateNetworkResponse() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "deleteNetworkResponse")).thenReturn(deleteNetworkResponse)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.validateNetworkResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_200() {
+
+ println "************ validateSDNCResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateSDNCResponse(mockExecution, sdncAdapterWorkflowResponse)
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_404() {
+
+ println "************ validateSDNCResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from SNDC Adapter: HTTP Status 404.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRpcSDNCDeactivateResponse() {
+
+ println "************ validateRpcSDNCDeactivateResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCReturnCode")).thenReturn("200")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncDeactivateRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ @Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+
+ // postProcessResponse(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.postProcessResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(deleteRollbackNetworkRequest)
+ //when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(null)
+ //when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn(sdncAdapaterDeactivateRollback)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteNetworkInstance")
+ 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("DoDeleteNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..a8bdfb0633
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
@@ -0,0 +1,127 @@
+/*-
+ * ============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 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 org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void preProcessRequestTest() {
+
+ ExecutionEntity mex = setupMock()
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+
+ DoDeleteServiceInstance instance = new DoDeleteServiceInstance()
+ instance.preProcessRequest(mex)
+
+ Mockito.verify(mex).setVariable("sdncCallbackUrl", "/mso/sdncadapter/")
+ Mockito.verify(mex).setVariable("siParamsXml", "")
+ }
+
+
+ @Test
+ public void testPostProcessAAIGET() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn('http://localhost:8090')
+ when(mockExecution.getVariable("GENGS_FoundIndicator")).thenReturn(true)
+ when(mockExecution.getVariable("sdnc.si.svc.types")).thenReturn("")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalSubscriberId_test")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("subscriptionServiceType_test")
+
+ String aaiGetResponse = FileUtil.readResourceFile("__files/GenericFlows/aaiGetResponse.xml")
+ when(mockExecution.getVariable("GENGS_service")).thenReturn(aaiGetResponse)
+ when(mockExecution.getVariable("GENGS_siResourceLink")).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()
+ DoDeleteServiceInstance instance = new DoDeleteServiceInstance()
+ instance.postProcessAAIGET(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("sendToSDNC", true)
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteServiceInstance")
+ 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("DoDeleteServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ 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("")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
new file mode 100644
index 0000000000..fcb0fb0940
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
@@ -0,0 +1,172 @@
+/*-
+ * ============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 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.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleFromVnfTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("source")).thenReturn("VID")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", "DDVFMV_")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_contrailNetworkPolicyFqdnList", null)
+ Mockito.verify(mockExecution).setVariable("mso-request-id", "12345")
+ Mockito.verify(mockExecution).setVariable("requestId", "12345")
+ Mockito.verify(mockExecution).setVariable("cloudSiteId", "12345")
+ Mockito.verify(mockExecution).setVariable("source", "VID")
+ Mockito.verify(mockExecution).setVariable("isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("srvInstId", "")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_serviceInstanceIdToSdnc", "12345")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_sdncVersion", "8")
+ Mockito.verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:8090/SDNCAdapterCallback")
+ }
+
+
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleFromVnf.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoDeleteVfModuleFromVnf.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DDVFMV_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", 'DDVFMV_')
+ Mockito.verify(mockExecution).setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIForVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("mso.workflow.global.default.aai.namespace")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ mockData()
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.queryAAIForVfModule(mockExecution)
+
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable("DDVMFV_getVnfResponseCode", 200)
+ }
+
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModuleFromVnf")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModuleFromVnf")
+ 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("DoDeleteVfModuleFromVnf")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModuleFromVnf")
+ 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/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/GenerateVfModuleName_AAIResponse_Success.xml")))
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
new file mode 100644
index 0000000000..3390b1a6f0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
@@ -0,0 +1,163 @@
+/*-
+ * ============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 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.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.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPrepSDNCAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("requestId")).thenReturn("12345")
+ when(mockExecution.getVariable("source")).thenReturn("VID")
+ when(mockExecution.getVariable("serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable("DoDVfMod_serviceInstanceIdToSdnc")).thenReturn("123456789")
+ when(mockExecution.getVariable("vfModuleName")).thenReturn("vfModuleName_test")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVfModule obj = new DoDeleteVfModule()
+ obj.prepSDNCAdapterRequest(mockExecution, 'release')
+
+ String expectedValue = FileUtil.readResourceFile("__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue())
+ }
+
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModule.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoDeleteVfModule.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoDeleteVfModule obj = new DoDeleteVfModule()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIVfModuleForStatus() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_vfModuleName")).thenReturn("module-0")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModuleForStatus(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleForStatusResponseCode", 200)
+ }
+
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModule")
+ 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("DoDeleteVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModule")
+ 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/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module[?]vf-module-name=module-0"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoDeleteVfModule/getGenericVnfResponse.xml")))
+
+ }
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
new file mode 100644
index 0000000000..730be14df0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
@@ -0,0 +1,152 @@
+/*-
+ * ============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 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.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleVolumeV2Test {
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testCallRESTQueryAAICloudRegion() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleVolumeV2.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.callRESTQueryAAICloudRegion(mockExecution, "true")
+ Mockito.verify(mockExecution).setVariable("DDVMV_queryCloudRegionReturnCode", "200")
+ Mockito.verify(mockExecution).setVariable("DDVMV_aicCloudRegion", "RDM2WAGPLCP")
+ }
+
+ @Test
+ public void testCallRESTQueryAAICloudRegionAAiEndpointNull() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleVolumeV2.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.callRESTQueryAAICloudRegion(mockExecution, "true")
+
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ Mockito.verify(mockExecution,atLeastOnce()).setVariable(captor.capture(),captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals(9999, workflowException.getErrorCode())
+ }
+
+ @Test
+ public void testPrepareVnfAdapterDeleteRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("aicCloudRegion")).thenReturn("RegionOne")
+ when(mockExecution.getVariable("tenantId")).thenReturn("12345")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable("volumeGroupHeatStackId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:18080/mso/WorkflowMessage")
+
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.prepareVnfAdapterDeleteRequest(mockExecution, "true")
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String str = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml")
+ XmlComparator.assertXMLEquals(str, captor.getValue(),"messageId","notificationUrl")
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModuleVolumeV2")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModuleVolumeV2")
+ 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("DoDeleteVfModuleVolumeV2")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModuleVolumeV2")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/12345"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
new file mode 100644
index 0000000000..0b95ffc053
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
@@ -0,0 +1,162 @@
+/*-
+ * ============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 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.*
+
+@RunWith(MockitoJUnitRunner.class)
+public class DoDeleteVnfAndModulesTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ String cloudConfiguration = "{ " +
+ "\"lcpCloudRegionId\": \"mdt1\"," +
+ "\"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\"" + "}";
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPreProcessRequestTest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("cloudConfiguration")).thenReturn(cloudConfiguration)
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("serviceInstanceId")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("productFamilyId")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("mdt1")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_test")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", "DDVAM_")
+ Mockito.verify(mockExecution).setVariable("requestId", "12345")
+ Mockito.verify(mockExecution).setVariable("mso-request-id", "12345")
+ Mockito.verify(mockExecution).setVariable("DDVAM_source", "VID")
+ Mockito.verify(mockExecution).setVariable("DDVAM_isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("DDVAM_sdncVersion", "1702")
+ Mockito.verify(mockExecution).setVariable("DDVAM_isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:8090/SDNCAdapterCallback")
+ }
+
+
+
+ @Test
+ public void testQueryAAIVfModuleNullEndPoint() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVnfAndModules.aai.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ Mockito.verify(mockExecution,atLeastOnce()).setVariable(captor.capture(),captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals("AAI GET Failed:null", workflowException.getErrorMessage())
+ Assert.assertEquals(1002, workflowException.getErrorCode())
+ }
+
+ @Test
+ public void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVnfAndModules.aai.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleResponseCode", 200)
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVnfAndModules")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVnfAndModules")
+ 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("DoDeleteVnfAndModules")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVnfAndModules")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private void mockData() {
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse_hasRelationships.xml")));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..4e993525f9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 CMCC 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 com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+class DoScaleE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DoScaleE2EServiceInstance.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+ public DoScaleE2EServiceInstanceTest(){
+ super("DoScaleE2EServiceInstance")
+ }
+
+ @Test
+ public void preProcessRequestTest(){
+
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DoScaleE2EServiceInstance instance = new DoScaleE2EServiceInstance()
+ instance.preProcessRequest(mex)
+ verify(mex).setVariable("resourceTemplateUUIDs", "ns111:ns333:")
+ }
+
+ @Test
+ public void preInitResourcesOperStatusTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DoScaleE2EServiceInstance instance = new DoScaleE2EServiceInstance()
+ instance.preInitResourcesOperStatus(mex)
+
+ verify(mex).setVariable("serviceInstanceId","e151059a-d924-4629-845f-264db19e50b4")
+ verify(mex).setVariable("operationId", "59960003992")
+ verify(mex).setVariable("operationType", "SCALE")
+ verify(mex).setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:ns="http://org.onap.so/requestsdb"
+ xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus>
+ <serviceId>e151059a-d924-4629-845f-264db19e50b4</serviceId>
+ <operationId>59960003992</operationId>
+ <operationType>SCALE</operationType>
+ <resourceTemplateUUIDs>ns111:ns333:</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+ verify(mex).setVariable("CVFMI_initResOperStatusRequest", payload)
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+ when(mex.getVariable("resourceTemplateUUIDs")).thenReturn("ns111:ns333:")
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..0189d065df
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,332 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+ String Prefix="UPDNETIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:28090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:28090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ }
+
+
+ @Test
+ @Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC activate rollback completed. + PO Network rollback completed. + SNDC assign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateNetworkInstanceRollback")
+ 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("DoUpdateNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..de3db5b5a8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
@@ -0,0 +1,2762 @@
+/*-
+ * ============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.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkTableReference;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutNetworkIdWithDepth;
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="UPDNETI_"
+
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+
+ String jsonIncomingRequest_MissingCloudRegion =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }}"""
+
+
+
+ String expectedNetworkRequestMissingNetworkId =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>null</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedNetworkInputMissingCloudRegion =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>null</sdncVersion>
+</network-inputs>"""
+
+ String networkInputsMissingName =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name/>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+String networkInputsMissingCloudRegion =
+"""<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+String expectedNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+String expectedVperNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedVperNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+String expectedNetworkInputsMissingNetworkId =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+
+ String NetworkRequest_noPhysicalName =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:modelCustomizationId></vnfreq:modelCustomizationId>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <network-params>
+ <param name="dhcp-enabled">true</param>
+ <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
+ <param name="cidr-mask">true</param>
+ <param name="backoutOnFailure">true</param>
+ <param name="gateway-address">10.10.125.1</param>
+ </network-params>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ String vnfRequestFakeRegion =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest_Outputs =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-update</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <subnet-role>ECOMP</subnet-role>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>
+ <route-prefix>10.102.0.0/16</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301151</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>
+ <route-prefix>192.168.2.0/25</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponseTestScenario01 =
+ """<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
+ <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
+ <network-name>GN_EVPN_direct_net_0_ST1</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1465398611</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
+ <gateway-address>108.239.40.1</gateway-address>
+ <network-start-address>108.239.40.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>108.239.40.0</dhcp-start>
+ <dhcp-end>108.239.40.0</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ <subnet>
+ <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
+ <gateway-address>2606:ae00:2e01:604::1</gateway-address>
+ <network-start-address>2606:ae00:2e01:604::</network-start-address>
+ <cidr-mask>64</cidr-mask>
+ <ip-version>6</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
+ <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ </subnets>
+ <ctag-assignments />
+ <segmentation-assignments>
+ <segmentation-id>416</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
+ </related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value></property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
+ </relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>Ruchira Contrail 3.0 test</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>GN_EVPN_direct_net_0_ST1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list/>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryNameAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String queryNameAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String aaiVpnResponseStub =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://org.openecomp.aai.inventory/v8"
+ contentType="text/xml">
+ <vpn-binding>
+ <global-route-target/>
+ </vpn-binding>
+</rest:payload>"""
+
+ String queryVpnBindingAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <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/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</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/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</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/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+
+ String updateNetworkRequest =
+ """<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>172.20.1.0/24</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>10.102.0.0/16</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.168.2.0/25</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+String updateNetworkRequest_noPhysicalName =
+"""<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid/>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>172.20.1.0/24</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>10.102.0.0/16</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.168.2.0/25</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>null</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+ String updateNetworkResponseREST =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <networkStackId></networkStackId>
+ <subnetMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetMap>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ <messageId>messageId_generated</messageId>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateRollbackNetworkRequest =
+ """<rollbackNetworkRequest>
+ <networkRollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </networkRollback>
+</rollbackNetworkRequest>"""
+
+ String updateNetworkResponse =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkUpdated>true</networkUpdated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateContrailAAIPayloadRequest =
+ """<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Active</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-role>ECOMP</subnet-role>
+ <resource-version>1505857300987</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>
+ <route-prefix>10.102.0.0/16</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301151</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>
+ <route-prefix>192.168.2.0/25</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type/>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+
+ String updateContrailAAIResponse =
+ """<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>"""
+
+ String updateNetworkErrorResponse =
+ """<updateNetworkError>
+ <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+ <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+ <rolledBack>true</rolledBack>
+ </updateNetworkError>"""
+
+
+ String networkException500 =
+ """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.onap.so/network", the namespace on the "updateNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>MNS-25180-L-01-dmz_direct_net_1/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String changeAssignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="com:att:sdnctl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncRollbackRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+
+ String sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="com:att:sdnctl:vnf">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="com:att:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String rollbackSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String rollbackNetworkRequest =
+"""<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "messageId", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+ verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "networkId", "")
+
+ verify(mockExecution).setVariable(Prefix + "isPONR", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", null)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 0)
+ verify(mockExecution).setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 0)
+ verify(mockExecution).setVariable(Prefix + "tableRefCollection", "")
+
+
+ // AAI requery Id
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "updateNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "isVnfBindingPresent", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId", "")
+
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputs)
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vPERNetworkRequest() {
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedVperNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedVperNetworkInputs)
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingNetworkId() {
+
+ println "************ preProcessRequest_MissingName() ************* "
+
+ WorkflowException missingNameWorkflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Variable 'network-id' value/element is missing.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingNetworkId)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputsMissingNetworkId)
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingNameWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingCloudRegion() {
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+
+ WorkflowException missingCloudRegionWorkflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "requestDetails has missing 'aic-cloud-region' value/element.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest_MissingCloudRegion)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingCloudRegionWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedVperNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", updateNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest_NoPhysicalname() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(NetworkRequest_noPhysicalName)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", updateNetworkRequest_noPhysicalName)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(aaiResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCRequest", changeAssignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBindingList_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 1)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkTableReference("UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", "refFQDN1");
+ MockGetNetworkTableReference("UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", "refFQDN2");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network-table-reference.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.route-table-reference.uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 2)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest", "http://localhost:8090/aai/v8/network/route-table-references/route-table-reference/refFQDN1?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 1)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest", "http://localhost:8090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.validateUpdateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "updateNetworkResponse", updateNetworkResponseREST)
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", updateRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('500')
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateUpdateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse() {
+
+ println "************ validateSDNCResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_Error() {
+
+ println "************ validateSDNCResponse ************* "
+ //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ //verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackNetworkRequest)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("requestId")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.postProcessResponse(mockExecution)
+
+// verify(mockExecution, atLeast(3)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(3)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateNetworkInstance")
+ 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("DoUpdateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
new file mode 100644
index 0000000000..beaebceaf7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
@@ -0,0 +1,309 @@
+/*-
+ * ============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 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.common.scripts.VfModule
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateVfModuleTest {
+
+ def prefix = "DOUPVfMod_"
+ String doUpdateVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/DoUpdateVfModuleRequest.xml");
+ String sdncChangeAssignRequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncChangeAssignRequest.xml")
+ String sdncTopologyRequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncTopologyRequest.xml")
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DoUpdateVfModuleRequest")).thenReturn(doUpdateVfModuleRequest)
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution, atLeastOnce()).getVariable("mso.workflow.sdncadapter.callback")
+ }
+
+
+
+ @Test
+ void testPrepConfirmVolumeGroupTenant() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("att-aic")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("mso.workflow.default.aai.cloud-region.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepConfirmVolumeGroupTenant(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionReturnCode", "200")
+ Mockito.verify(mockExecution).setVariable(prefix + "cloudRegionForVolume", "AAIAIC25")
+ Mockito.verify(mockExecution).setVariable(prefix + "isCloudRegionGood", true)
+ }
+
+
+ @Test
+ void testPrepSDNCTopologyChg() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+
+
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable("volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable(prefix + "usePreload")).thenReturn("Y")
+ when(mockExecution.getVariable(prefix + "vnfNameFromAAI")).thenReturn("skask-test")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'vf-module-name', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable("vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyChg(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable(prefix + "vnfName", "skask-test")
+
+ Mockito.verify(mockExecution, times(2)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(sdncChangeAssignRequest, captor.getValue())
+ }
+
+
+
+ @Test
+ void testPrepSDNCTopologyQuery() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyQuery(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(sdncTopologyRequest, captor.getValue())
+ }
+
+
+
+ @Test
+ void testPrepVnfAdapterRest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "vfModuleIndex")).thenReturn("index")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "backoutOnFailure")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "asdcServiceModelVersion")).thenReturn("1.0")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+ when(mockExecution.getVariable(prefix + "baseVfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "baseVfModuleHeatStackId")).thenReturn("12345")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'heat-stack-id', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ String sdncGetResponse = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncGetResponse.xml");
+ when(mockExecution.getVariable(prefix + "sdncTopologyResponse")).thenReturn(sdncGetResponse)
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable(prefix + "vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepVnfAdapterRest(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/vnfAdapterRestRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+
+
+ @Test
+ void testPrepSDNCTopologyAct() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "usePreload")).thenReturn("Y")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'vf-module-name', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyAct(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncActivateRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue())
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable(prefix + "queryAAIVfModuleResponseCode", 200)
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateVfModule")
+ 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("DoUpdateVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateVfModule")
+ 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]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml")))
+
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/getGenericVnfResponse.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
new file mode 100644
index 0000000000..ba54787dc1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
@@ -0,0 +1,126 @@
+/*-
+ * ============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 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.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateVnfAndModulesTest {
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVnfAndModules obj = new DoUpdateVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DUVAM_queryAAIVfModuleResponseCode", 200)
+ }
+
+ @Test
+ @Ignore
+ void testQueryAAIVfModuleEndpointNull() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoUpdateVnfAndModules obj = new DoUpdateVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable(captor.capture(), captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals(1002, workflowException.getErrorCode())
+ Assert.assertEquals("AAI GET Failed:org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateVfModule")
+ 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("DoUpdateVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateVfModule")
+ 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/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/getGenericVnfResponse.xml")))
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..e196a62e1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+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.camunda.bpm.engine.runtime.Execution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+@RunWith(MockitoJUnitRunner.class)
+class SacleCustomE2EServiceInstanceTest{
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ String globalSubscriberId="test_custormer"
+ String requestDescription = "request description for test"
+ def utils = new MsoUtils()
+
+ String jsonIncomingRequest = """{"service":{
+ "serviceType":"example-service-type",
+ "globalSubscriberId":"test_custormer",
+ "resources":[
+ {
+ "resourceInstanceId":"ns111",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":{
+ "scaleNsByStepsData":{
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ },
+ {
+ "resourceInstanceId":"ns333",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":{
+ "scaleNsByStepsData":{
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ }],
+ "serviceInstanceName":"XXXX"
+ },
+ "operationId":"0a5b1651-c56e-4263-8c26-c8f8a6ef72d8"
+ }"""
+
+ String xmlMsoCompletionRequest = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:w1aaan0="http://org.onap/so/infra/vnf-request/v1">
+ <w1aaan0:request-info>
+ <w1aaan0:request-id>56c881ad-6c9d-4b79-aacc-401e5640b47f</w1aaan0:request-id>
+ <w1aaan0:action>SCALE</w1aaan0:action>
+ <w1aaan0:source>null</w1aaan0:source>
+ </w1aaan0:request-info>
+ <status-message>Service Instance was scaled successfully.</status-message>
+ <serviceInstanceId>56c881ad-6c9d-4b79-aacc-401e5640b47f</serviceInstanceId>
+ <mso-bpel-name>ScaleGenericALaCarteServiceInstance</mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ String requestInfo = """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>56c881ad-6c9d-4b79-aacc-401e5640b47f</request-id>
+ <action>SCALE</action>
+ <source>null</source>
+ </request-info>"""
+
+ String payload ="""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>56c881ad-6c9d-4b79-aacc-401e5640b47f</serviceId>
+ <operationId>0a5b1651-c56e-4263-8c26-c8f8a6ef72d8</operationId>
+ <operationType>SCALE</operationType>
+ <userId></userId>
+ <result>processing</result>
+ <operationContent>Prepare service scaling</operationContent>
+ <progress>0</progress>
+ <reason></reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ public void preProcessRequestTest() {
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).setVariable("globalSubscriberId", globalSubscriberId)
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("requestDescription", requestDescription)
+ }
+
+ @Test
+ public void sendSyncResponseTest() {
+ println "************ sendSyncResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("operationId")).thenReturn("3338b250-e995-4782-8936-081b66ba4dbf")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("sentSyncResponse", true)
+ }
+
+ @Test
+ public void prepareCompletionRequestTest() {
+ println "************ prepareCompletionRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.prepareCompletionRequest(mockExecution)
+
+ verify(mockExecution).setVariable("CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+
+ }
+
+ @Test
+ public void prepareInitServiceOperationStatusTest() {
+ println "************ prepareInitServiceOperationStatus ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ //when(mockExecution.getVariable("serviceInstanceName")).thenReturn("XXXX")
+ when(mockExecution.getVariable("operationId")).thenReturn("0a5b1651-c56e-4263-8c26-c8f8a6ef72d8")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.prepareInitServiceOperationStatus(mockExecution)
+
+ payload = utils.formatXml(payload)
+ verify(mockExecution).setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..fd3c1e352f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
@@ -0,0 +1,358 @@
+/*-
+ * ============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.mockito.Mockito.*
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+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.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="UPDNI_"
+ def utils = new MsoUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been updated successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+String jsonIncomingRequest =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.getNetworkModelInfo(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("UpdateNetworkInstanceResponseCode", "202")
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("UpdateNetworkInstanceResponseCode", "500")
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstance", 5300, "Received error from SDN-C: No availability zone available.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ //when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.postProcessResponse(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void processRollbackData() {
+
+ println "************ callDBCatalog() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.processRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateNetworkInstance")
+ 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("UpdateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..620b0b787d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,134 @@
+/*-
+ * ============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 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.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateVfModuleVolumeInfraV1Test {
+
+ def prefix = "UPDVfModVol_"
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testQueryAAIForVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDVfModVol_relatedVfModuleLink")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module/12345")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ mockData()
+ UpdateVfModuleVolumeInfraV1 obj = new UpdateVfModuleVolumeInfraV1()
+ obj.queryAAIForVfModule(mockExecution, "true")
+
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable("UPDVfModVol_personaModelId", "ff5256d2-5a33-55df-13ab-12abad84e7ff")
+ }
+
+ @Test
+ void testPrepVnfAdapterRest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("")
+ when(mockExecution.getVariable(prefix + "aaiVolumeGroupResponse")).thenReturn(FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml"))
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vnf1")
+ when(mockExecution.getVariable(prefix + "vnfVersion")).thenReturn("1")
+ when(mockExecution.getVariable(prefix + "AAIQueryGenericVfnResponse")).thenReturn(FileUtil.readResourceFile("__files/GenericFlows/getGenericVnfByNameResponse.xml"))
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+
+ mockData()
+ UpdateVfModuleVolumeInfraV1 obj = new UpdateVfModuleVolumeInfraV1()
+ obj.prepVnfAdapterRest(mockExecution, "true")
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ def updateVolumeGroupRequest = captor.getValue()
+ String expectedValue = FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, updateVolumeGroupRequest, "messageId", "notificationUrl")
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ 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("UpdateVfModuleVolumeInfraV1")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ 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/12345/vf-modules/vf-module/.*"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
new file mode 100644
index 0000000000..523c791efc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
@@ -0,0 +1,1269 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.HomingSolution
+import org.onap.so.bpmn.mock.FileUtil
+
+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.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.HomingSolution
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapGetter
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateVcpeResCustServiceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/request.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public CreateVcpeResCustServiceTest() {
+ super("CreateVcpeResCustService")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+ @Ignore // 1802 merge
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("aaiDistDelay", "aaidelay")
+ verify(mex).setVariable("createVcpeServiceRequest", request)
+ verify(mex).setVariable("msoRequestId", "mri")
+ assertEquals("sii", map.get("serviceInstanceId"))
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ assertTrue(map.containsKey("subscriberInfo"))
+
+ verify(mex).setVariable("brgWanMacAddress", "brgmac")
+ verify(mex).setVariable("customerLocation", ["customerLatitude":"32.897480", "customerLongitude":"-97.040443", "customerName":"some_company"])
+ verify(mex).setVariable("homingService", "sniro")
+ assertTrue(map.containsKey("serviceInputParams"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_MissingAaiDistDelay() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore // 1802 merge
+ public void preProcessRequest_EmptyParts() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"source"', '"sourceXXX"')
+ .replace('"BRG_WAN_MAC_Address"', '"BRG_WAN_MAC_AddressXXX"')
+ .replace('"Customer_Location"', '"Customer_LocationXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("createVcpeServiceRequest", req)
+ verify(mex).setVariable("msoRequestId", "mri")
+ assertNotNull(map.get("serviceInstanceId"))
+ assertFalse(map.get("serviceInstanceId").isEmpty())
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ assertTrue(map.containsKey("subscriberInfo"))
+
+ assertEquals("", map.get("brgWanMacAddress"))
+ assertEquals("", map.get("customerLocation"))
+ assertEquals("oof", map.get("homingService"))
+ assertTrue(map.containsKey("serviceInputParams"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ println reqinfo
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_MissingSubscriberId() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"globalSubscriberId"', '"globalSubscriberIdXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ // ***** sendSyncResponse *****
+
+ @Test
+ // @Ignore
+ public void sendSyncResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncResponse(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncResponse(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("202", map.get(processName+"ResponseCode"))
+ assertEquals("Success", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf('"instanceId":"sii"') >= 0)
+ assertTrue(resp.indexOf('"requestId":"mri"') >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initSendSyncResponse(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.sendSyncResponse(mex) }))
+ }
+
+
+ // ***** prepareDecomposeService *****
+
+ @Test
+ // @Ignore
+ public void prepareDecomposeService() {
+ ExecutionEntity mex = setupMock()
+ initPrepareDecomposeService(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareDecomposeService(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("serviceModelInfo", "mi")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareDecomposeService_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareDecomposeService(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareDecomposeService(mex) }))
+ }
+
+
+ // ***** prepareCreateServiceInstance *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateServiceInstance() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateServiceInstance(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateServiceInstance(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("serviceInstanceName", "VCPE1")
+ verify(mex).setVariable("serviceDecompositionString", "mydecomp")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateServiceInstance_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateServiceInstance(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateServiceInstance(mex) }))
+ }
+
+
+ // ***** postProcessServiceInstanceCreate *****
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessServiceInstanceCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessServiceInstanceCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ def reqinfo = map.get(Prefix+"setUpdateDbInstancePayload")
+
+ assertTrue(reqinfo.indexOf("<requestId>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<serviceInstanceId>sii</") >= 0)
+ assertTrue(reqinfo.indexOf("<serviceInstanceName>sin</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessServiceInstanceCreate(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable(endsWith("setUpdateDbInstancePayload"), any())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessServiceInstanceCreate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessServiceInstanceCreate(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable(endsWith("setUpdateDbInstancePayload"), any())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessServiceInstanceCreate(mex) }))
+ }
+
+
+ // ***** processDecomposition *****
+
+ @Test
+ // @Ignore
+ public void processDecomposition() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfList", svcdecomp.getVnfResources())
+ verify(mex).setVariable("vnfListString", '[myvnf]')
+ verify(mex).setVariable(Prefix+"VNFsCount", 1)
+
+ verify(mex).setVariable("vnfModelInfo", "mymodel")
+ verify(mex).setVariable("vnfModelInfoString", "mymodel")
+ }
+
+ @Test
+ // @Ignore
+ public void processDecomposition_EmptyNet_EmptyVnf() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ when(svcdecomp.getVnfResources()).thenReturn(new LinkedList<VnfResource>())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfList", svcdecomp.getVnfResources())
+ verify(mex).setVariable("vnfListString", '[]')
+ verify(mex).setVariable(Prefix+"VNFsCount", 0)
+
+ verify(mex).setVariable("vnfModelInfo", "")
+ verify(mex).setVariable("vnfModelInfoString", "")
+ }
+
+ @Test
+ // @Ignore
+ public void processDecomposition_Ex() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ when(svcdecomp.getVnfResources()).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processDecomposition(mex) }))
+ }
+
+
+ // ***** filterVnfs *****
+
+ @Test
+ // @Ignore
+ public void filterVnfs() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initFilterVnfs(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).setVariable("vnfListString", '[myvnf3, myvnf5]')
+ }
+
+ @Test
+ // @Ignore
+ public void filterVnfs_Null() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initFilterVnfs(mex)
+
+ when(svcdecomp.getVnfResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ // nothing more to check, as long as it didn't throw an exception
+ }
+
+
+ // ***** prepareCreateAllottedResourceTXC *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceTXC(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("createTXCAR", true)
+ verify(mex).setVariable("allottedResourceModelInfoTXC", "modelB")
+ verify(mex).setVariable("allottedResourceRoleTXC", "TXCr")
+ verify(mex).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
+ verify(mex).setVariable("parentServiceInstanceIdTXC", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC_NullArList() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initPrepareCreateAllottedResourceTXC(mex)
+
+ when(svcdecomp.getAllottedResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex, never()).setVariable("createTXCAR", true)
+ verify(mex, never()).setVariable("allottedResourceModelInfoTXC", "modelB")
+ verify(mex, never()).setVariable("allottedResourceRoleTXC", "TXCr")
+ verify(mex, never()).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
+ verify(mex, never()).setVariable("parentServiceInstanceIdTXC", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceTXC(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex) }))
+ }
+
+
+ // ***** prepareCreateAllottedResourceBRG *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceBRG(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("createBRGAR", true)
+ verify(mex).setVariable("allottedResourceModelInfoBRG", "modelB")
+ verify(mex).setVariable("allottedResourceRoleBRG", "BRGr")
+ verify(mex).setVariable("allottedResourceTypeBRG", "BRG")
+ verify(mex).setVariable("parentServiceInstanceIdBRG", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG_NullArList() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initPrepareCreateAllottedResourceBRG(mex)
+
+ when(svcdecomp.getAllottedResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex, never()).setVariable("createBRGAR", true)
+ verify(mex, never()).setVariable("allottedResourceModelInfoBRG", "modelB")
+ verify(mex, never()).setVariable("allottedResourceRoleBRG", "BRGr")
+ verify(mex, never()).setVariable("allottedResourceTypeBRG", "BRG")
+ verify(mex, never()).setVariable("parentServiceInstanceIdBRG", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceBRG(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex) }))
+ }
+
+
+ // ***** prepareVnfAndModulesCreate *****
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_EmptyList() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenReturn(new LinkedList<VnfResource>())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_NullList() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareVnfAndModulesCreate(mex) }))
+ }
+
+
+ // ***** validateVnfCreate *****
+
+ @Test
+ // @Ignore
+ public void validateVnfCreate() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.validateVnfCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"VnfsCreatedCount", 3)
+ }
+
+ @Test
+ // @Ignore
+ public void validateVnfCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfCreate(mex)
+
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.validateVnfCreate(mex) }))
+ }
+
+
+ // ***** postProcessResponse *****
+
+ @Test
+ // @Ignore
+ public void postProcessResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessResponse(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"Success", true)
+
+ def reqinfo = map.get(Prefix+"CompleteMsoProcessRequest")
+
+ assertTrue(reqinfo.indexOf("request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("source>mysrc</") >= 0)
+ assertTrue(reqinfo.indexOf("serviceInstanceId>sii</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessResponse_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ def wfe = initPreProcessRollback(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ def wfe = initPostProcessRollback(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessRollback(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+
+ // ***** prepareFalloutRequest *****
+
+ @Test
+ // @Ignore
+ public void prepareFalloutRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareFalloutRequest(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ def fo = map.get(Prefix+"falloutRequest")
+
+ assertTrue(fo.indexOf("<hello>world</") >= 0)
+ assertTrue(fo.indexOf("ErrorMessage>mymsg</") >= 0)
+ assertTrue(fo.indexOf("ErrorCode>999</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void prepareFalloutRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareFalloutRequest(mex) }))
+ }
+
+ // ***** sendSyncError *****
+
+ @Test
+ // @Ignore
+ public void sendSyncError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>mymsg</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_NotWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn("not a WFE")
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ assertFalse(map.containsKey(processName+"ResponseCode"))
+ }
+
+
+ // ***** processJavaException *****
+
+ @Test
+ // @Ignore
+ public void processJavaException() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prefix", Prefix)
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Caught a Java Lang Exception", wfe.getErrorMessage())
+ }
+
+ @Test
+ // @Ignore
+ public void processJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void processJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Exception in processJavaException method", wfe.getErrorMessage())
+ }
+
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn("aaidelay")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ }
+
+ private initSendSyncResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ private void initPrepareDecomposeService(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn('{"requestDetails":{"modelInfo":"mi"}}')
+ }
+
+ private void initPrepareCreateServiceInstance(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+
+ when(svcdecomp.toJsonStringNoRootName()).thenReturn("mydecomp")
+ }
+
+ private void initPostProcessServiceInstanceCreate(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+ }
+
+ private ServiceDecomposition initProcessDecomposition(ExecutionEntity mex) {
+ List<VnfResource> vnflst = new LinkedList<>()
+ vnflst.add(makeVnf("", ""))
+ vnflst.add(makeVnf("2", "BRG"))
+ vnflst.add(makeVnf("3", "BRG"))
+
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ when(svcdecomp.getVnfResources()).thenReturn(vnflst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+
+ return svcdecomp
+ }
+
+ private ServiceDecomposition initFilterVnfs(ExecutionEntity mex) {
+ List<VnfResource> vnflst = new LinkedList<>()
+ vnflst.add(makeVnf("", "BRG"))
+ vnflst.add(makeVnf("2", "Tunnel XConn"))
+ vnflst.add(makeVnf("3", ""))
+ vnflst.add(makeVnf("4", "BRG"))
+ vnflst.add(makeVnf("5", "other"))
+
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ when(svcdecomp.getVnfResources()).thenReturn(vnflst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+
+ return svcdecomp
+ }
+
+ private initAwaitAaiDistribution(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private ServiceDecomposition initPrepareCreateAllottedResourceTXC(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ List<AllottedResource> arlst = new LinkedList<>()
+
+ arlst.add(makeArBRG("A"))
+ arlst.add(makeArTXC("B"))
+ arlst.add(makeArBRG("C"))
+
+ when(svcdecomp.getAllottedResources()).thenReturn(arlst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+
+ return svcdecomp
+ }
+
+ private ServiceDecomposition initPrepareCreateAllottedResourceBRG(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ List<AllottedResource> arlst = new LinkedList<>()
+
+ arlst.add(makeArTXC("A"))
+ arlst.add(makeArBRG("B"))
+ arlst.add(makeArTXC("C"))
+
+ when(svcdecomp.getAllottedResources()).thenReturn(arlst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+
+ return svcdecomp
+ }
+
+ private AllottedResource makeArTXC(String id) {
+ AllottedResource ar = mock(AllottedResource.class)
+ ModelInfo mod = mock(ModelInfo.class)
+ HomingSolution home = mock(HomingSolution.class)
+
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
+ when(ar.getAllottedResourceType()).thenReturn("Tunnel XConn")
+ when(ar.getModelInfo()).thenReturn(mod)
+ when(ar.getAllottedResourceRole()).thenReturn("TXCr")
+ when(ar.getHomingSolution()).thenReturn(home)
+
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
+
+ when(home.getServiceInstanceId()).thenReturn("home"+id)
+
+ return ar
+ }
+
+ private AllottedResource makeArBRG(String id) {
+ AllottedResource ar = mock(AllottedResource.class)
+ ModelInfo mod = mock(ModelInfo.class)
+ HomingSolution home = mock(HomingSolution.class)
+
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
+ when(ar.getAllottedResourceType()).thenReturn("BRG")
+ when(ar.getModelInfo()).thenReturn(mod)
+ when(ar.getAllottedResourceRole()).thenReturn("BRGr")
+ when(ar.getHomingSolution()).thenReturn(home)
+
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
+
+ when(home.getServiceInstanceId()).thenReturn("home"+id)
+
+ return ar
+ }
+
+ private initPrepareVnfAndModulesCreate(ExecutionEntity mex) {
+
+ List<VnfResource> vnflst = new LinkedList<>()
+
+ vnflst.add(makeVnf("A", "BRG"))
+ vnflst.add(makeVnf("B", ""))
+ vnflst.add(makeVnf("C", ""))
+ vnflst.add(makeVnf("D", "Tunnel XConn"))
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("vnfList")).thenReturn(vnflst)
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenReturn(2)
+ when(mex.getVariable("vnfModelInfo")).thenReturn("nomodel")
+ when(mex.getVariable("sdncVersion")).thenReturn("myvers")
+ }
+
+ private VnfResource makeVnf(String id, String role) {
+ ModelInfo mod = mock(ModelInfo.class)
+ VnfResource vnf = mock(VnfResource.class)
+
+ when(mod.toString()).thenReturn('{"modelInfo":"mymodel'+id+'"}')
+
+ when(vnf.toString()).thenReturn("myvnf"+id)
+ when(vnf.getModelInfo()).thenReturn(mod)
+ when(vnf.getNfRole()).thenReturn(role)
+
+ return vnf
+ }
+
+ private initValidateVnfCreate(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenReturn(2)
+ }
+
+ private initPostProcessResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("source")).thenReturn("mysrc")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ private WorkflowException initPreProcessRollback(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ return wfe
+ }
+
+ private WorkflowException initPostProcessRollback(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ return wfe
+ }
+
+ private initPrepareFalloutRequest(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ when(wfe.getErrorCode()).thenReturn(999)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+ when(mex.getVariable(Prefix+"requestInfo")).thenReturn("<hello>world</hello>")
+
+ return wfe
+ }
+
+ private initSendSyncError(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ }
+
+ private initProcessJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
new file mode 100644
index 0000000000..b7c754938a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
@@ -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.bpmn.vcpe.scripts
+
+
+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.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+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.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.ModelInfo
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapGetter
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DeleteVcpeResCustServiceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/VCPE/DeleteVcpeResCustService/request.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DeleteVcpeResCustServiceTest() {
+ super("DeleteVcpeResCustService")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertEquals(Prefix, map.get("prefix"))
+ assertEquals(request, map.get("DeleteVcpeResCustServiceRequest"))
+ assertEquals("mri", map.get("msoRequestId"))
+ assertEquals("ra", map.get("requestAction"))
+ assertEquals("VID", map.get("source"))
+ assertEquals(CUST, map.get("globalSubscriberId"))
+ assertEquals(CUST, map.get("globalCustomerId"))
+ assertEquals("false", map.get("disableRollback"))
+ assertEquals("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", map.get("productFamilyId"))
+ assertEquals(SVC, map.get("subscriptionServiceType"))
+
+ assertEquals("mdt1", map.get("lcpCloudRegionId"))
+ assertEquals("8b1df54faa3b49078e3416e21370a3ba", map.get("tenantId"))
+ assertEquals("1707", map.get("sdncVersion"))
+ assertEquals("service-instance", map.get("GENGS_type"))
+ assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_EmptyParts() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"source"', '"sourceXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("DeleteVcpeResCustServiceRequest", req)
+ verify(mex).setVariable("msoRequestId", "mri")
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration"))
+ verify(mex).setVariable("sdncVersion", "1707")
+ verify(mex).setVariable("GENGS_type", "service-instance")
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ println reqinfo
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_MissingServiceInstanceId() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ }
+
+ // ***** sendSyncResponse *****
+
+ @Test
+// @Ignore
+ public void sendSyncResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncResponse(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncResponse(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("202", map.get(processName+"ResponseCode"))
+ assertEquals("Success", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf('"instanceId":"sii"') >= 0)
+ assertTrue(resp.indexOf('"requestId":"mri"') >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initSendSyncResponse(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.sendSyncResponse(mex) }))
+ }
+
+ private initSendSyncResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ // ***** prepareServiceDelete *****
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareServiceDelete(mex)
+
+ myMockGetAr("/aai/v11/anytxc", 200, "arGetTXCById.xml");
+ myMockGetAr("/aai/v11/anybrg", 200, "arGetBRGById.xml");
+ myMockGetAr("/aai/v11/other", 200, "arGetOtherById.xml");
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareServiceDelete(mex)
+
+ verify(mex).setVariable(Prefix+"TunnelXConn", true)
+ assertEquals("ar-txcA", map.get("TXC_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"BRG", true)
+ assertEquals("ar-brgB", map.get("BRG_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"vnfsCount", 2)
+ assertNotNull(map.get(Prefix+"relatedVnfIdList"))
+ assertEquals("[vnfX, vnfY]", map.get(Prefix+"relatedVnfIdList").toString())
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_NotFound() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(false)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_Empty() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_service")).thenReturn("<empty></empty>")
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareServiceDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"TunnelXConn", false)
+ assertNull(map.get("TXC_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"BRG", false)
+ assertNull(map.get("BRG_allottedResourceId"))
+
+ assertEquals(0, map.get(Prefix+"vnfsCount"))
+ assertFalse(map.containsKey(Prefix+"relatedVnfIdList"))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ private initPrepareServiceDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(true)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("DeleteVcpeResCustServiceRequest")).thenReturn(request)
+ when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("GENGS_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml"))
+ }
+
+ // ***** getAaiAr *****
+
+ @Test
+// @Ignore
+ public void getAaiAr() {
+ myMockGetAr("/myurl/ar1", 200, "arGetBRGById.xml");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals("BRG", type)
+ assertEquals("ar-brgB", id)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAr_401() {
+ myMockGetAr("/myurl/ar1", 401, "arGetBRGById.xml");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals(null, type)
+ assertEquals(null, id)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAr_EmptyResponse() {
+ myMockGetAr("/myurl/ar1", 200, "empty.txt");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals(null, type)
+ assertEquals(null, id)
+ }
+
+ private void initGetAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ // ***** prepareVnfAndModulesDelete *****
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfId", "vnfB")
+ }
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete_Empty() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenReturn(new LinkedList())
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfId", "")
+ }
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex) }))
+ }
+
+ private initPrepareVnfAndModulesDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenReturn(Arrays.asList("vnfA", "vnfB", "vnfC"))
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenReturn(1)
+ }
+
+ // ***** validateVnfDelete *****
+
+ @Test
+// @Ignore
+ public void validateVnfDelete() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfDelete(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.validateVnfDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"vnfsDeletedCount", 3)
+ }
+
+ @Test
+// @Ignore
+ public void validateVnfDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfDelete(mex)
+
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.validateVnfDelete(mex) }))
+ }
+
+ private initValidateVnfDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenReturn(2)
+ }
+
+ // ***** postProcessResponse *****
+
+ @Test
+// @Ignore
+ public void postProcessResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.postProcessResponse(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertEquals(true, map.get(Prefix+"Success"))
+
+ def req = map.get(Prefix+"CompleteMsoProcessRequest")
+
+ assertTrue(req.indexOf("<request-id>mri</") >= 0)
+ assertTrue(req.indexOf("<source>mysrc</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessResponse_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ private initPostProcessResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("source")).thenReturn("mysrc")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+
+ // ***** prepareFalloutRequest *****
+
+ @Test
+// @Ignore
+ public void prepareFalloutRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareFalloutRequest(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ def fo = map.get(Prefix+"falloutRequest")
+
+ assertTrue(fo.indexOf("<hello>world</") >= 0)
+ assertTrue(fo.indexOf("ErrorMessage>mymsg</") >= 0)
+ assertTrue(fo.indexOf("ErrorCode>999</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void prepareFalloutRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.prepareFalloutRequest(mex) }))
+ }
+
+ private initPrepareFalloutRequest(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ when(wfe.getErrorCode()).thenReturn(999)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+ when(mex.getVariable(Prefix+"requestInfo")).thenReturn("<hello>world</hello>")
+
+ return wfe
+ }
+
+ // ***** sendSyncError *****
+
+ @Test
+// @Ignore
+ public void sendSyncError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>mymsg</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_NotWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn("not a WFE")
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ assertFalse(map.containsKey(processName+"ResponseCode"))
+ }
+
+ private initSendSyncError(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ }
+
+
+ // ***** processJavaException *****
+
+ @Test
+// @Ignore
+ public void processJavaException() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prefix", Prefix)
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Caught a Java Lang Exception", wfe.getErrorMessage())
+ }
+
+ @Test
+// @Ignore
+ public void processJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+// @Ignore
+ public void processJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Exception in processJavaException method", wfe.getErrorMessage())
+ }
+
+ private initProcessJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private void myMockGetAr(String url, int status, String fileResp) {
+ stubFor(get(urlMatching(url))
+ .willReturn(aResponse()
+ .withStatus(status)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VCPE/DeleteVcpeResCustService/" + fileResp)));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
new file mode 100644
index 0000000000..1e8842e68f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
@@ -0,0 +1,654 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+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.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+
+import org.onap.so.bpmn.core.RollbackData
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceBRGRollbackTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARBRGRB_"
+ String RbType = "DCARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceBRGRollbackTest() {
+ super("DoCreateAllottedResourceBRGRollback")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ ////verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_RollbackDisabled() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("disableRollback")).thenReturn("true")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ ////verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ data.put(RbType, "rollbackAAI", "false")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex, never()).setVariable("rollbackAAI", true)
+ verify(mex, never()).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+ data.put(RbType, "rollbackSDNCassign", "false")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex, never()).setVariable("rollbackSDNC", true)
+ verify(mex, never()).setVariable("deactivateSdnc", "myactivate")
+ verify(mex, never()).setVariable("deleteSdnc", "mycreate")
+ verify(mex, never()).setVariable("unassignSdnc", "true")
+ verify(mex, never()).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex, never()).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex, never()).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoRbStructure() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(new RollbackData())
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NullRb() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success")
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_EmptyResponse() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/v[0-9]+/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ when(mex.getVariable("aaiARPath")).thenReturn(null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError404() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("404", "expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_RolledBack() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenReturn(true)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ verify(mex).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ verify(mex, never()).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+ }
+
+ private RollbackData initPreProcess(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+ when(mex.getVariable("rollbackAAI")).thenReturn(true)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(true)
+ when(mex.getVariable("disableRollback")).thenReturn("false")
+
+ data.put("SERVICEINSTANCE", "allottedResourceId", "myid")
+
+ data.put(RbType, "serviceInstanceId", "sii")
+ data.put(RbType, "parentServiceInstanceId", "psii")
+
+ data.put(RbType, "rollbackAAI", "true")
+ data.put(RbType, "aaiARPath", "mypath")
+
+ data.put(RbType, "rollbackSDNCassign", "true")
+ data.put(RbType, "rollbackSDNCactivate", "myactivate")
+ data.put(RbType, "rollbackSDNCcreate", "mycreate")
+ data.put(RbType, "sdncActivateRollbackReq", "activatereq")
+ data.put(RbType, "sdncCreateRollbackReq", "createreq")
+ data.put(RbType, "sdncAssignRollbackReq", "assignreq")
+
+ return data
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn(VERS)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initPostProcessRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("skipRollback")).thenReturn(false)
+ }
+
+ private initProcessRollbackException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initProcessRollbackJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
new file mode 100644
index 0000000000..543bb1db05
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
@@ -0,0 +1,999 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource_500
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceBRGTest() {
+ super("DoCreateAllottedResourceBRG")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdnc.replication.delay"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
+ assertTrue(checkMissingPreProcessRequest("vni"))
+ assertTrue(checkMissingPreProcessRequest("vgmuxBearerIP"))
+ assertTrue(checkMissingPreProcessRequest("brgWanMacAddress"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceRole"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceType"))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex).setVariable("foundActiveAR", true)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_Duplicate() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // fail if duplicate
+ when(mex.getVariable("failExists")).thenReturn("true")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_NotActive() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // not active
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("not-active")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void getAaiAR_NoStatus() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn(null)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex, never()).setVariable("foundActiveAR", true)
+ }
+
+
+ // ***** createAaiAR *****
+
+ @Test
+ @Ignore
+ public void createAaiAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.createAaiAR(mex)
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals("45", data.get(Prefix, "disableRollback"))
+ assertEquals("true", data.get(Prefix, "rollbackAAI"))
+ assertEquals(ARID, data.get(Prefix, "allottedResourceId"))
+ assertEquals("sii", data.get(Prefix, "serviceInstanceId"))
+ assertEquals("psii", data.get(Prefix, "parentServiceInstanceId"))
+ assertEquals(mex.getVariable("PSI_resourceLink")+"/allotted-resources/allotted-resource/"+ARID, data.get(Prefix, "aaiARPath"))
+ }
+
+ @Test
+ @Ignore
+ public void createAaiAR_NoArid_NoModelUuids() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ // no allottedResourceId - will be generated
+
+ when(mex.getVariable("allottedResourceId")).thenReturn(null)
+
+ wireMockRule
+ .stubFor(put(urlMatching("/aai/.*/allotted-resource/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.createAaiAR(mex)
+
+ def arid = map.get("allottedResourceId")
+ assertNotNull(arid)
+ assertFalse(arid.isEmpty())
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals(arid, data.get(Prefix, "allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_MissingPsiLink() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(null)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_HttpFailed() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource_500(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new BpmnError("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new RuntimeException("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ String result = DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<brg-wan-mac-address>bwma</") >= 0)
+ assertTrue(result.indexOf("<vni>myvni</") >= 0)
+ assertTrue(result.indexOf("<vgmux-bearer-ip>vbi</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid>miu</") >= 0)
+ assertTrue(result.indexOf("<model-uuid>mu</") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid>mcu</") >= 0)
+ assertTrue(result.indexOf("<model-version>mv</") >= 0)
+ assertTrue(result.indexOf("<model-name>mn</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_EmptyModelInfo() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("{}")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ String result = DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<brg-wan-mac-address>bwma</") >= 0)
+ assertTrue(result.indexOf("<vni>myvni</") >= 0)
+ assertTrue(result.indexOf("<vgmux-bearer-ip>vbi</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCAssign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex)
+
+ def req = map.get("sdncAssignRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncAssignRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>assign</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCCreate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex)
+
+ def req = map.get("sdncCreateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncCreateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>create</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex) }))
+ }
+
+
+ // ***** preProcessSDNCActivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex)
+
+ def req = map.get("sdncActivateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncActivateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>activate</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable("rollbackData")
+
+ assertEquals(data, map.get("rollbackData"))
+
+ assertEquals("true", data.get(Prefix, "rollback" + "SDNCcreate"))
+
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Get() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "get")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+
+ verify(mex, never()).getVariable("rollbackData")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ // unsuccessful
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+
+ // ***** preProcessSDNCGet *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_FoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>arlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_NotFoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenReturn(false)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>assignlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCGet(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** generateOutputs *****
+
+ @Test
+// @Ignore
+ public void generateOutputs() {
+ ExecutionEntity mex = setupMock()
+ def brgtop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml")
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn(brgtop)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+
+ verify(mex).setVariable("allotedResourceName", "namefromrequest")
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_BadXml() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn("invalid xml")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+// @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+// verify(mex, never()).setVariable("prevWorkflowException", any())
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+// @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+
+// verify(mex, never()).setVariable("WorkflowException", any())
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.postProcessRollback(mex) }))
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoCreateAllottedResourceBRG.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("mso.workflow.sdnc.replication.delay")).thenReturn("sdncdelay")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
+ when(mex.getVariable("vni")).thenReturn("myvni")
+ when(mex.getVariable("vgmuxBearerIP")).thenReturn("vbi")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("arr")
+ when(mex.getVariable("allottedResourceType")).thenReturn("art")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRGt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRGr")
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initCreateAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable("disableRollback")).thenReturn(45)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST)
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRGt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRGr")
+ when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx+"/aai/v9/mycsi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"modelinvuuid",
+ "modelUuid":"modeluuid",
+ "modelCustomizationUuid":"modelcustuuid"
+ }
+ """)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("vni")).thenReturn("myvni")
+ when(mex.getVariable("vgmuxBearerIP")).thenReturn("vbi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"miu",
+ "modelUuid":"mu",
+ "modelCustomizationUuid":"mcu",
+ "modelVersion":"mv",
+ "modelName":"mn"
+ }
+ """)
+ }
+
+ private RollbackData initPreProcessSDNC(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private initPreProcessSDNCGet(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ when(mex.getVariable("foundActiveAR")).thenReturn(true)
+ when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
+ when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ }
+
+ private RollbackData initValidateSDNCResp(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
new file mode 100644
index 0000000000..66cfdb635d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
@@ -0,0 +1,654 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+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.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+
+import org.onap.so.bpmn.core.RollbackData
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceTXCRollbackTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARTXCRB_"
+ String RbType = "DCARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceTXCRollbackTest() {
+ super("DoCreateAllottedResourceTXCRollback")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_RollbackDisabled() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("disableRollback")).thenReturn("true")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ data.put(RbType, "rollbackAAI", "false")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex, never()).setVariable("rollbackAAI", true)
+ verify(mex, never()).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+ data.put(RbType, "rollbackSDNCassign", "false")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex, never()).setVariable("rollbackSDNC", true)
+ verify(mex, never()).setVariable("deactivateSdnc", "myactivate")
+ verify(mex, never()).setVariable("deleteSdnc", "mycreate")
+ verify(mex, never()).setVariable("unassignSdnc", "true")
+ verify(mex, never()).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex, never()).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex, never()).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoRbStructure() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(new RollbackData())
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NullRb() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success")
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_EmptyResponse() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/v[0-9]+/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ when(mex.getVariable("aaiARPath")).thenReturn(null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError404() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("404", "expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_RolledBack() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenReturn(true)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ verify(mex).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ verify(mex, never()).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+ }
+
+ private RollbackData initPreProcess(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+ when(mex.getVariable("rollbackAAI")).thenReturn(true)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(true)
+ when(mex.getVariable("disableRollback")).thenReturn("false")
+
+ data.put("SERVICEINSTANCE", "allottedResourceId", "myid")
+
+ data.put(RbType, "serviceInstanceId", "sii")
+ data.put(RbType, "parentServiceInstanceId", "psii")
+
+ data.put(RbType, "rollbackAAI", "true")
+ data.put(RbType, "aaiARPath", "mypath")
+
+ data.put(RbType, "rollbackSDNCassign", "true")
+ data.put(RbType, "rollbackSDNCactivate", "myactivate")
+ data.put(RbType, "rollbackSDNCcreate", "mycreate")
+ data.put(RbType, "sdncActivateRollbackReq", "activatereq")
+ data.put(RbType, "sdncCreateRollbackReq", "createreq")
+ data.put(RbType, "sdncAssignRollbackReq", "assignreq")
+
+ return data
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn(VERS)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initPostProcessRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("skipRollback")).thenReturn(false)
+ }
+
+ private initProcessRollbackException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initProcessRollbackJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
new file mode 100644
index 0000000000..fa40c17e63
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
@@ -0,0 +1,957 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import org.springframework.beans.factory.config.YamlPropertiesFactoryBean
+import org.springframework.core.io.ClassPathResource
+import org.springframework.core.io.FileSystemResource
+import org.springframework.core.io.Resource
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource_500
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ aaiUriPfx = UrnPropertiesReader.getVariable("aai.endpoint")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceTXCTest() {
+ super("DoCreateAllottedResourceTXC")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+ // @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdnc.replication.delay"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
+ assertTrue(checkMissingPreProcessRequest("brgWanMacAddress"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceRole"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceType"))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex).setVariable("foundActiveAR", true)
+ }
+
+ @Test
+ // @Ignore
+ public void getAaiAR_Duplicate() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // fail if duplicate
+ when(mex.getVariable("failExists")).thenReturn("true")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void getAaiAR_NotActive() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // not active
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("not-active")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void getAaiAR_NoStatus() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn(null)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex, never()).setVariable("foundActiveAR", true)
+ }
+
+
+ // ***** createAaiAR *****
+
+ @Test
+ @Ignore
+ public void createAaiAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.createAaiAR(mex)
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals("45", data.get(Prefix, "disableRollback"))
+ assertEquals("true", data.get(Prefix, "rollbackAAI"))
+ assertEquals(ARID, data.get(Prefix, "allottedResourceId"))
+ assertEquals("sii", data.get(Prefix, "serviceInstanceId"))
+ assertEquals("psii", data.get(Prefix, "parentServiceInstanceId"))
+ assertEquals(mex.getVariable("PSI_resourceLink")+"/allotted-resources/allotted-resource/"+ARID, data.get(Prefix, "aaiARPath"))
+ }
+
+ @Test
+ @Ignore
+ public void createAaiAR_NoArid_NoModelUuids() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ // no allottedResourceId - will be generated
+
+ when(mex.getVariable("allottedResourceId")).thenReturn(null)
+
+ wireMockRule
+ .stubFor(put(urlMatching("/aai/.*/allotted-resource/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.createAaiAR(mex)
+
+ def arid = map.get("allottedResourceId")
+ assertNotNull(arid)
+ assertFalse(arid.isEmpty())
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals(arid, data.get(Prefix, "allottedResourceId"))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_MissingPsiLink() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(null)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_HttpFailed() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource_500(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new BpmnError("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new RuntimeException("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+ // @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ String result = DoCreateAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCAssign *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex)
+
+ def req = map.get("sdncAssignRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncAssignRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>assign</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCCreate *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex)
+
+ def req = map.get("sdncCreateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncCreateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>create</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex) }))
+ }
+
+
+ // ***** preProcessSDNCActivate *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex)
+
+ def req = map.get("sdncActivateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncActivateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>activate</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable("rollbackData")
+
+ assertEquals(data, map.get("rollbackData"))
+
+ assertEquals("true", data.get(Prefix, "rollback" + "SDNCcreate"))
+
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Get() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "get")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+
+ verify(mex, never()).getVariable("rollbackData")
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ // unsuccessful
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+
+ // ***** preProcessSDNCGet *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_FoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>arlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_NotFoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenReturn(false)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>assignlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCGet(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** generateOutputs *****
+
+ @Test
+ // @Ignore
+ public void generateOutputs() {
+ ExecutionEntity mex = setupMock()
+ def txctop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml")
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn(txctop)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+
+ verify(mex).setVariable("allotedResourceName", "namefromrequest")
+ verify(mex).setVariable("vni", "my-vni")
+ verify(mex).setVariable("vgmuxBearerIP", "my-bearer-ip")
+ verify(mex).setVariable("vgmuxLanIP", "my-lan-ip")
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_BadXml() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn("invalid xml")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+// verify(mex, never()).setVariable("prevWorkflowException", any())
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+
+// verify(mex, never()).setVariable("WorkflowException", any())
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.postProcessRollback(mex) }))
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoCreateAllottedResourceTXC.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("mso.workflow.sdnc.replication.delay")).thenReturn("sdncdelay")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("arr")
+ when(mex.getVariable("allottedResourceType")).thenReturn("art")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXCt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXCr")
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initCreateAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable("disableRollback")).thenReturn(45)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST)
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXCt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXCr")
+ when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx+"/aai/v9/mycsi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"modelinvuuid",
+ "modelUuid":"modeluuid",
+ "modelCustomizationUuid":"modelcustuuid"
+ }
+ """)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private RollbackData initPreProcessSDNC(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private initPreProcessSDNCGet(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ when(mex.getVariable("foundActiveAR")).thenReturn(true)
+ when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
+ when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ }
+
+ private RollbackData initValidateSDNCResp(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
new file mode 100644
index 0000000000..e8004d3d2b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
@@ -0,0 +1,606 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.delete
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoDeleteAllottedResourceBRGTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DDARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoDeleteAllottedResourceBRGTest() {
+ super("DoDeleteAllottedResourceBRG")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex).setVariable("parentServiceInstanceId", INST)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_EmptyResponse() {
+
+ // note: empty result-link
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/.*/search/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("<result-data></result-data>")))
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ String result = DoDeleteAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCUnassign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex)
+
+ def req = map.get("sdncUnassignRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDelete *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex)
+
+ def req = map.get("sdncDeleteRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDeactivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex)
+
+ def req = map.get("sdncDeactivateRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable(Prefix+"sdncResponseSuccess")
+
+ verify(mex, never()).getVariable(Prefix + "sdncRequestDataResponseCode")
+ verify(mex, never()).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate_FailNotFound() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+ when(mex.getVariable("failNotFound")).thenReturn("true")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")
+
+ verify(mex).setVariable("ARNotFoundInSDNC", true)
+ verify(mex).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRG")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRG")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceBRG/getAR.xml"))
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("mso.workflow.global.default.aai.version")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.version"))
+ when(mex.getVariable("mso.workflow.default.aai.v8.nodes.query.uri")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.default.aai.v8.nodes-query.uri"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private initPreProcessSDNC(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp(int code) {
+ return "<response-data>&lt;response-code&gt;${code}&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn("myvers")
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
new file mode 100644
index 0000000000..6719be17a1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
@@ -0,0 +1,607 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.delete
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById
+
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoDeleteAllottedResourceTXCTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DDARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoDeleteAllottedResourceTXCTest() {
+ super("DoDeleteAllottedResourceTXC")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex).setVariable("parentServiceInstanceId", INST)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_EmptyResponse() {
+
+ // note: empty result-link
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/.*/search/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("<result-data></result-data>")))
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ String result = DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCUnassign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex)
+
+ def req = map.get("sdncUnassignRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDelete *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex)
+
+ def req = map.get("sdncDeleteRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDeactivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex)
+
+ def req = map.get("sdncDeactivateRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable(Prefix+"sdncResponseSuccess")
+
+ verify(mex, never()).getVariable(Prefix + "sdncRequestDataResponseCode")
+ verify(mex, never()).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate_FailNotFound() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+ when(mex.getVariable("failNotFound")).thenReturn("true")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")
+
+ verify(mex).setVariable("ARNotFoundInSDNC", true)
+ verify(mex).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXC")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXC")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceTXC/getAR.xml"))
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("mso.workflow.global.default.aai.version")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.version"))
+ when(mex.getVariable("mso.workflow.default.aai.v8.nodes.query.uri")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.default.aai.v8.nodes-query.uri"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private initPreProcessSDNC(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp(int code) {
+ return "<response-data>&lt;response-code&gt;${code}&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn("myvers")
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
new file mode 100644
index 0000000000..764e6244d4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
@@ -0,0 +1,124 @@
+/*
+ * ============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.vcpe.scripts
+
+
+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.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import org.springframework.beans.factory.config.YamlPropertiesFactoryBean
+import org.springframework.core.io.ClassPathResource
+import org.springframework.core.io.Resource
+
+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.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class GroovyTestBase {
+
+ static final int PORT = 28090
+ static final String LOCAL_URI = "http://localhost:" + PORT
+
+ static final String CUST = "SDN-ETHERNET-INTERNET"
+ static final String SVC = "123456789"
+ static final String INST = "MIS%252F1604%252F0026%252FSW_INTERNET"
+ static final String ARID = "arId-1"
+ static final String VERS = "myvers"
+
+ static final String DBGFLAG = "isDebugLogEnabled"
+
+ static String aaiUriPfx
+
+ String processName
+
+ public static void setUpBeforeClass() {
+ aaiUriPfx = UrnPropertiesReader.getVariable("aai.endpoint")
+ }
+
+ public GroovyTestBase(String processName) {
+ this.processName = processName
+ }
+
+ public boolean doBpmnError(def func) {
+
+ try {
+ func()
+ return false;
+
+ } catch(BpmnError e) {
+ return true;
+ }
+ }
+
+ public ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn(processName)
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn(processName)
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mex = mock(ExecutionEntity.class)
+
+ when(mex.getId()).thenReturn("100")
+ when(mex.getProcessDefinitionId()).thenReturn(processName)
+ when(mex.getProcessInstanceId()).thenReturn(processName)
+ when(mex.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mex.getProcessEngineServices().getRepositoryService().getProcessDefinition(mex.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ when(mex.getVariable("isAsyncProcess")).thenReturn("true")
+ when(mex.getVariable(processName+"WorkflowResponseSent")).thenReturn("false")
+
+ return mex
+ }
+
+ public Map<String,Object> setupMap(ExecutionEntity mex) {
+ MapSetter mapset = new MapSetter();
+ doAnswer(mapset).when(mex).setVariable(any(), any())
+ return mapset.getMap();
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
new file mode 100644
index 0000000000..fa5dcec4bc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
@@ -0,0 +1,49 @@
+/*
+ * ============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.vcpe.scripts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+class MapGetter implements Answer<Object> {
+ final Map<String,Object> map;
+
+ public MapGetter() {
+ map = new HashMap<>();
+ }
+
+ public MapGetter(Map<String,Object> map) {
+ this.map = map;
+ }
+
+ public Map<String, Object> getMap() {
+ return map;
+ }
+
+ @Override
+ public Object answer(InvocationOnMock invocation) throws Throwable {
+ return map.get(invocation.getArgumentAt(0, String.class));
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
new file mode 100644
index 0000000000..7b50c616ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
@@ -0,0 +1,50 @@
+/*
+ * ============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.vcpe.scripts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+class MapSetter implements Answer<Void> {
+ final Map<String,Object> map;
+
+ public MapSetter() {
+ map = new HashMap<>();
+ }
+
+ public MapSetter(Map<String,Object> map) {
+ this.map = map;
+ }
+
+ public Map<String, Object> getMap() {
+ return map;
+ }
+
+ @Override
+ public Void answer(InvocationOnMock invocation) throws Throwable {
+ map.put(invocation.getArgumentAt(0, String.class), invocation.getArgumentAt(1, Object.class));
+ return null;
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json
new file mode 100644
index 0000000000..c824213423
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json
@@ -0,0 +1,72 @@
+{
+ "variables": {
+ "bpmnRequest": {
+ "value": "{\n \"requestDetails\": {\n \"cloudConfiguration\": {\n \"lcpCloudRegionId\": \"mtn6\", \n \"tenantId\": \"0422ffb57ba042c0800a29dc85ca70f8\"\n }, \n \"modelInfo\": {\n \"modelInvariantUuid\": \"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f\", \n \"modelName\": \"MSO Test Network\", \n \"modelType\": \"service\", \n \"modelUuid\": \"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e\", \n \"modelVersion\": \"1.0\"\n }, \n \"owningEntity\": {\n \"owningEntityId\": \"123459af-0427-42c2-9d15-971b99b12345\", \n \"owningEntityName\": \"vSAMP10a Entity-200\"\n }, \n \"project\": {\n \"projectName\": \"vSAMP10a Project-3\"\n }, \n \"requestInfo\": {\n \"instanceName\": \"MSO-DEV-SI-1802-v6-2-19-10\", \n \"requestorId\": \"xxxxxx\", \n \"source\": \"VID\", \n \"suppressRollback\": false\n }, \n \"requestParameters\": {\n \"aLaCarte\": true, \n \"subscriptionServiceType\": \"MSO-dev-service-type\", \n \"userParams\": [\n {\n \"name\": \"someUserParam\", \n \"value\": \"someValue\"\n }\n ]\n }, \n \"subscriberInfo\": {\n \"globalSubscriberId\": \"MSO_1610_dev\", \n \"subscriberName\": \"MSO_1610_dev\"\n }\n }\n}\n",
+ "type": "String"
+ },
+ "requestId": {
+ "value": "6dd20050-76ee-418f-a153-50720a8f3286",
+ "type": "String"
+ },
+ "mso-request-id": {
+ "value": "6dd20050-76ee-418f-a153-50720a8f3286",
+ "type": "String"
+ },
+ "isBaseVfModule": {
+ "value": false,
+ "type": "Boolean"
+ },
+ "recipeTimeout": {
+ "value": 180,
+ "type": "Integer"
+ },
+ "requestAction": {
+ "value": "createInstance",
+ "type": "String"
+ },
+ "serviceInstanceId": {
+ "value": "",
+ "type": "String"
+ },
+ "vnfId": {
+ "value": "",
+ "type": "String"
+ },
+ "vfModuleId": {
+ "value": "",
+ "type": "String"
+ },
+ "volumeGroupId": {
+ "value": "",
+ "type": "String"
+ },
+ "networkId": {
+ "value": "",
+ "type": "String"
+ },
+ "configurationId": {
+ "value": "",
+ "type": "String"
+ },
+ "serviceType": {
+ "value": "",
+ "type": "String"
+ },
+ "vnfType": {
+ "value": "",
+ "type": "String"
+ },
+ "vfModuleType": {
+ "value": "",
+ "type": "String"
+ },
+ "networkType": {
+ "value": "",
+ "type": "String"
+ },
+ "host": {
+ "value": "localhost",
+ "type": "String"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn
new file mode 100644
index 0000000000..b33aad7443
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn
@@ -0,0 +1,54 @@
+<?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="_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:process id="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="set rollbackData">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1v2f9n5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rollbackData", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_1v2f9n5</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1v2f9n5" sourceRef="initialization" targetRef="EndEvent_1" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRG">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="35" 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="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="35" y="241" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-55" y="225.5" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
+ <dc:Bounds x="235" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="208" y="263" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1v2f9n5_di" bpmnElement="SequenceFlow_1v2f9n5">
+ <di:waypoint xsi:type="dc:Point" x="135" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="235" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="219" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn
new file mode 100644
index 0000000000..807efae1af
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn
@@ -0,0 +1,55 @@
+<?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="_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:process id="DoCreateAllottedResourceBRGRollback" name="DoCreateAllottedResourceBRGRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_03yvb82" />
+ <bpmn2:endEvent id="EndEvent_1sn21jr">
+ <bpmn2:incoming>SequenceFlow_1epm19d</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_03yvb82" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1epm19d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1epm19d" sourceRef="ScriptTask_03yvb82" targetRef="EndEvent_1sn21jr" />
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRGRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="66" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="433" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="ScriptTask_03yvb82_di">
+ <di:waypoint xsi:type="dc:Point" x="101" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="207" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="109" y="396" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1sn21jr_di" bpmnElement="EndEvent_1sn21jr">
+ <dc:Bounds x="413" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="432" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03yvb82_di" bpmnElement="ScriptTask_03yvb82">
+ <dc:Bounds x="207" y="370" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1epm19d_di" bpmnElement="SequenceFlow_1epm19d">
+ <di:waypoint xsi:type="dc:Point" x="307" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="404" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn
new file mode 100644
index 0000000000..b2f280d7e9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn
@@ -0,0 +1,38 @@
+<?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="_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:process id="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ </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" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceTXC">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_EndEvent_225">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
+ <dc:Bounds x="139" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="112" y="263" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..532ca867bb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn
@@ -0,0 +1,53 @@
+<?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="_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:process id="DoCreateServiceInstanceRollback" name="DoCreateServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1ipu8um</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1l4c4k0</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_05ltxyj" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1ipu8um</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1l4c4k0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ipu8um" sourceRef="createSIRollback_startEvent" targetRef="ScriptTask_05ltxyj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1l4c4k0" sourceRef="ScriptTask_05ltxyj" targetRef="EndEvent_3" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="484" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="457" y="120" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_05ltxyj_di" bpmnElement="ScriptTask_05ltxyj">
+ <dc:Bounds x="287" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ipu8um_di" bpmnElement="SequenceFlow_1ipu8um">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="287" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="237" y="76" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1l4c4k0_di" bpmnElement="SequenceFlow_1l4c4k0">
+ <di:waypoint xsi:type="dc:Point" x="387" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="435.5" y="76" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn
new file mode 100644
index 0000000000..5e4400e9bd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="DoCreateVnfAndModules" name="DoCreateVnfAndModules" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_11sp3s9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_11sp3s9" sourceRef="StartEvent_1" targetRef="ScriptTask_0y5wsgy" />
+ <bpmn:scriptTask id="ScriptTask_0y5wsgy" name="set rollbackData">
+ <bpmn:incoming>SequenceFlow_11sp3s9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0q1lfmf</bpmn:outgoing>
+ <bpmn:script><![CDATA[#{execution.setVariable("rollbackData", true)}]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0q1lfmf" sourceRef="ScriptTask_0y5wsgy" targetRef="EndEvent_0vgtf5f" />
+ <bpmn:endEvent id="EndEvent_0vgtf5f">
+ <bpmn:incoming>SequenceFlow_0q1lfmf</bpmn:incoming>
+ </bpmn:endEvent>
+ </bpmn:process>
+ <bpmn:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11sp3s9_di" bpmnElement="SequenceFlow_11sp3s9">
+ <di:waypoint xsi:type="dc:Point" x="188" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="268" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="183" y="144" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y5wsgy_di" bpmnElement="ScriptTask_0y5wsgy">
+ <dc:Bounds x="268" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q1lfmf_di" bpmnElement="SequenceFlow_0q1lfmf">
+ <di:waypoint xsi:type="dc:Point" x="368" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362.5" y="144" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0vgtf5f_di" bpmnElement="EndEvent_0vgtf5f">
+ <dc:Bounds x="447" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420" y="187" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn
new file mode 100644
index 0000000000..2867a671b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn
@@ -0,0 +1,53 @@
+<?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="_Wblj8GyfEeWUWLTvug7ZOg" 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:process id="DoCreateVnfAndModulesRollback" name="DoCreateVnfAndModulesRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1gai4qr">
+ <bpmn2:outgoing>SequenceFlow_1537b7m</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1seag7u">
+ <bpmn2:incoming>SequenceFlow_1mz2mgf</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1537b7m" sourceRef="StartEvent_1gai4qr" targetRef="ScriptTask_0fpaoo0" />
+ <bpmn2:scriptTask id="ScriptTask_0fpaoo0" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1537b7m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mz2mgf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mz2mgf" sourceRef="ScriptTask_0fpaoo0" targetRef="EndEvent_1seag7u" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModulesRollback">
+ <bpmndi:BPMNShape id="StartEvent_1gai4qr_di" bpmnElement="StartEvent_1gai4qr">
+ <dc:Bounds x="-91" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="691" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1seag7u_di" bpmnElement="EndEvent_1seag7u">
+ <dc:Bounds x="248" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="660" y="676" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1537b7m_di" bpmnElement="SequenceFlow_1537b7m">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="55" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-45" y="658" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0fpaoo0_di" bpmnElement="ScriptTask_0fpaoo0">
+ <dc:Bounds x="55" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mz2mgf_di" bpmnElement="SequenceFlow_1mz2mgf">
+ <di:waypoint xsi:type="dc:Point" x="155" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="201.5" y="652" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn
new file mode 100644
index 0000000000..517df36c74
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn
@@ -0,0 +1,37 @@
+<?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="_9MhrcHqVEea26OhQB97uCQ" 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:process id="DoDeleteVnfAndModules" name="DoDeleteVnfAndModules" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0qi7pl3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qi7pl3" sourceRef="StartEvent_1" targetRef="EndEvent_11dfyam" />
+ <bpmn2:endEvent id="EndEvent_11dfyam">
+ <bpmn2:incoming>SequenceFlow_0qi7pl3</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="238" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qi7pl3_di" bpmnElement="SequenceFlow_0qi7pl3">
+ <di:waypoint xsi:type="dc:Point" x="274" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="285.5" y="206" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_11dfyam_di" bpmnElement="EndEvent_11dfyam">
+ <dc:Bounds x="387" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="360" y="249" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn
new file mode 100644
index 0000000000..ad4c3c816d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn
@@ -0,0 +1,35 @@
+<?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="_vwRmIBsREeeIQtzUKIjH4g" 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:process id="Homing" name="Homing" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0tyavm9</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0n56tas">
+ <bpmn2:incoming>SequenceFlow_0tyavm9</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tyavm9" sourceRef="StartEvent_1" targetRef="EndEvent_0n56tas" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Homing">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="147" y="275" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ougemc_di" bpmnElement="EndEvent_0n56tas">
+ <dc:Bounds x="263" y="275" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="236" y="311" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tyavm9_di" bpmnElement="SequenceFlow_0tyavm9">
+ <di:waypoint xsi:type="dc:Point" x="183" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="263" y="293" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="223" y="272" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json
new file mode 100644
index 0000000000..a4190a76ee
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json
@@ -0,0 +1,12 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mdt1",
+ "cloud-type": "openstack",
+ "owner-defined-type": "lcp",
+ "cloud-region-version": "aic3.0",
+ "identity-url": "https://localhost:5000/v2.0",
+ "cloud-zone": "z1",
+ "complex-name": "c1",
+ "sriov-automation": false,
+ "resource-version": "1503072127235"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json
new file mode 100644
index 0000000000..921918f267
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json
@@ -0,0 +1,9 @@
+{
+ "vnf-id": "msoVnf123",
+ "vnf-name": "MSO-Test-VNF-123",
+ "vnf-type": "vnf-type",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1525360206136"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json
new file mode 100644
index 0000000000..f0936d6648
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json
@@ -0,0 +1,434 @@
+{
+ "vnf-id": "example-vnf-id-val-90603",
+ "vnf-name": "example-vnf-name-val-56838",
+ "vnf-name2": "example-vnf-name2-val-56319",
+ "vnf-type": "example-vnf-type-val-30533",
+ "service-id": "example-service-id-val-28290",
+ "regional-resource-zone": "example-regional-resource-zone-val-11059",
+ "prov-status": "example-prov-status-val-59777",
+ "operational-status": "example-operational-status-val-22513",
+ "in-maint": true,
+
+ "equipment-role": "example-equipment-role-val-23396",
+ "orchestration-status": "example-orchestration-status-val-59435",
+ "heat-stack-id": "example-heat-stack-id-val-96869",
+ "mso-catalog-key": "example-mso-catalog-key-val-30721",
+ "management-option": "example-management-option-val-61927",
+ "ipv4-oam-address": "192.168.10.14",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-87072",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-91063",
+ "management-v6-address": "example-management-v6-address-val-80466",
+ "vcpu": 45837298,
+ "vcpu-units": "example-vcpu-units-val-86249",
+ "vmemory": 57288956,
+ "vmemory-units": "example-vmemory-units-val-13291",
+ "vdisk": 16937143,
+ "vdisk-units": "example-vdisk-units-val-73197",
+
+ "is-closed-loop-disabled": true,
+ "summary-status": "example-summary-status-val-86438",
+ "encrypted-access-flag": true,
+
+
+
+
+ "model-invariant-id": "example-model-invariant-id-val-14704",
+ "model-version-id": "example-model-version-id-val-47847",
+ "model-customization-id": "example-model-customization-id-val-52688",
+ "widget-model-id": "example-widget-model-id-val-20939",
+ "widget-model-version": "example-widget-model-version-val-72210",
+ "as-number": "example-as-number-val-68358",
+ "regional-resource-subzone": "example-regional-resource-subzone-val-34391",
+ "nf-type": "example-nf-type-val-54866",
+ "nf-function": "example-nf-function-val-24790",
+ "nf-role": "example-nf-role-val-4780",
+ "nf-naming-code": "example-nf-naming-code-val-25118",
+ "selflink": "example-selflink-val-68404",
+
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/2c323333-af4f-4849-af03-c862c0e93e3b",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "e433710f-9217-458d-a79d-1c7aff376d89"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "VIRTUAL USP"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "2c323333-af4f-4849-af03-c862c0e93e3b"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "kjhgfd1"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm003"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/14551849-1e70-45cd-bc5d-a256d49548a2",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "14551849-1e70-45cd-bc5d-a256d49548a2"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm002"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/48bd7f11-408f-417c-b834-b41c1b98f7d7",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "48bd7f11-408f-417c-b834-b41c1b98f7d7"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm001"
+ }]
+ }
+ ]},
+
+
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-50593",
+ "interface-role": "example-interface-role-val-23375",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-5921",
+ "selflink": "example-selflink-val-75663",
+ "interface-id": "example-interface-id-val-37465",
+ "macaddr": "example-macaddr-val-62657",
+ "network-name": "example-network-name-val-7252",
+ "management-option": "example-management-option-val-32963",
+ "interface-description": "example-interface-description-val-89453",
+ "is-port-mirrored": true,
+ "vlans": {
+ "vlan": [
+ {
+ "vlan-interface": "example-vlan-interface-val-16684",
+ "vlan-id-inner": 8602916,
+ "vlan-id-outer": 97348542,
+ "speed-value": "example-speed-value-val-90330",
+ "speed-units": "example-speed-units-val-15849",
+ "vlan-description": "example-vlan-description-val-46942",
+ "backdoor-connection": "example-backdoor-connection-val-78445",
+
+ "orchestration-status": "example-orchestration-status-val-44994",
+
+
+
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-90277",
+ "l3-interface-ipv4-prefix-length": 3364150,
+ "vlan-id-inner": 44021171,
+ "vlan-id-outer": 55708677,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-43267",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-62870"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-45323",
+ "l3-interface-ipv6-prefix-length": 56688923,
+ "vlan-id-inner": 5703071,
+ "vlan-id-outer": 86682265,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-28366",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-53034"
+ }
+ ]
+ }
+ ]
+ },
+ "sriov-vfs": {
+ "sriov-vf": [
+ {
+ "pci-id": "example-pci-id-val-4720",
+ "vf-vlan-filter": "example-vf-vlan-filter-val-42594",
+ "vf-mac-filter": "example-vf-mac-filter-val-13375",
+ "vf-vlan-strip": true,
+ "vf-vlan-anti-spoof-check": true,
+ "vf-mac-anti-spoof-check": true,
+ "vf-mirrors": "example-vf-mirrors-val-6057",
+ "vf-broadcast-allow": true,
+ "vf-unknown-multicast-allow": true,
+ "vf-unknown-unicast-allow": true,
+ "vf-insert-stag": true,
+ "vf-link-status": "example-vf-link-status-val-81448",
+ "neutron-network-id": "example-neutron-network-id-val-9504"
+ }
+ ]
+ },
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-16738",
+ "interface-role": "example-interface-role-val-13943",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-63173",
+ "selflink": "example-selflink-val-43085",
+ "interface-id": "example-interface-id-val-51379",
+ "macaddr": "example-macaddr-val-16195",
+ "network-name": "example-network-name-val-45683",
+ "management-option": "example-management-option-val-78983",
+ "interface-description": "example-interface-description-val-34414",
+ "is-port-mirrored": true
+ }
+ ]
+ },
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-99078",
+ "l3-interface-ipv4-prefix-length": 55755841,
+ "vlan-id-inner": 81525473,
+ "vlan-id-outer": 90908072,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-47919",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-84236"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-21939",
+ "l3-interface-ipv6-prefix-length": 50057584,
+ "vlan-id-inner": 75774660,
+ "vlan-id-outer": 4421090,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-46377",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-16585"
+ }
+ ]
+ }
+ ]
+ },
+ "lag-interfaces": {
+ "lag-interface": [
+ {
+ "interface-name": "example-interface-name-val-39234",
+ "interface-description": "example-interface-description-val-1037",
+ "speed-value": "example-speed-value-val-1929",
+ "speed-units": "example-speed-units-val-74937",
+ "interface-id": "example-interface-id-val-91265",
+ "interface-role": "example-interface-role-val-19613",
+
+
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-10722",
+ "interface-role": "example-interface-role-val-95194",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-24328",
+ "selflink": "example-selflink-val-24987",
+ "interface-id": "example-interface-id-val-75726",
+ "macaddr": "example-macaddr-val-36940",
+ "network-name": "example-network-name-val-65359",
+ "management-option": "example-management-option-val-49521",
+ "interface-description": "example-interface-description-val-70528",
+ "is-port-mirrored": true,
+ "vlans": {
+ "vlan": [
+ {
+ "vlan-interface": "example-vlan-interface-val-70827",
+ "vlan-id-inner": 55659612,
+ "vlan-id-outer": 90335612,
+ "speed-value": "example-speed-value-val-54761",
+ "speed-units": "example-speed-units-val-91398",
+ "vlan-description": "example-vlan-description-val-17018",
+ "backdoor-connection": "example-backdoor-connection-val-4021",
+
+ "orchestration-status": "example-orchestration-status-val-18315",
+
+
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-59336",
+ "l3-interface-ipv4-prefix-length": 57636053,
+ "vlan-id-inner": 34068397,
+ "vlan-id-outer": 48570286,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-69862",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-75795"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-15038",
+ "l3-interface-ipv6-prefix-length": 42694503,
+ "vlan-id-inner": 15929806,
+ "vlan-id-outer": 87413856,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-52519",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-24471"
+ }
+ ]
+ }
+ ]
+ },
+ "sriov-vfs": {
+ "sriov-vf": [
+ {
+ "pci-id": "example-pci-id-val-44669",
+ "vf-vlan-filter": "example-vf-vlan-filter-val-53436",
+ "vf-mac-filter": "example-vf-mac-filter-val-71902",
+ "vf-vlan-strip": true,
+ "vf-vlan-anti-spoof-check": true,
+ "vf-mac-anti-spoof-check": true,
+ "vf-mirrors": "example-vf-mirrors-val-54963",
+ "vf-broadcast-allow": true,
+ "vf-unknown-multicast-allow": true,
+ "vf-unknown-unicast-allow": true,
+ "vf-insert-stag": true,
+ "vf-link-status": "example-vf-link-status-val-1546",
+ "neutron-network-id": "example-neutron-network-id-val-92159"
+ }
+ ]
+ },
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-9327",
+ "interface-role": "example-interface-role-val-21859",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-21445",
+ "selflink": "example-selflink-val-6085",
+ "interface-id": "example-interface-id-val-39854",
+ "macaddr": "example-macaddr-val-14433",
+ "network-name": "example-network-name-val-3722",
+ "management-option": "example-management-option-val-64739",
+ "interface-description": "example-interface-description-val-5814",
+ "is-port-mirrored": true
+
+
+
+ }
+ ]
+ },
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-64531",
+ "l3-interface-ipv4-prefix-length": 66545882,
+ "vlan-id-inner": 12194134,
+ "vlan-id-outer": 29589286,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-91108",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-56984"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-37408",
+ "l3-interface-ipv6-prefix-length": 5116459,
+ "vlan-id-inner": 39229896,
+ "vlan-id-outer": 15091934,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-87700",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-37352"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-id": "example-vf-module-id-val-56249",
+ "vf-module-name": "example-vf-module-name-val-18987",
+ "heat-stack-id": "example-heat-stack-id-val-80110",
+ "orchestration-status": "example-orchestration-status-val-8226",
+ "is-base-vf-module": true,
+ "model-invariant-id": "example-model-invariant-id-val-5071",
+ "model-version-id": "example-model-version-id-val-80793",
+ "model-customization-id": "example-model-customization-id-val-83277",
+ "widget-model-id": "example-widget-model-id-val-99814",
+ "widget-model-version": "example-widget-model-version-val-22799",
+ "contrail-service-instance-fqdn": "example-contrail-service-instance-fqdn-val-52133",
+ "module-index": 1933,
+ "selflink": "example-selflink-val-69992"
+ }
+ ]
+ },
+ "licenses": {
+ "license": [
+ {
+ "group-uuid": "example-group-uuid-val-73012",
+ "resource-uuid": "example-resource-uuid-val-80045"
+ }
+ ]
+ },
+ "entitlements": {
+ "entitlement": [
+ {
+ "group-uuid": "example-group-uuid-val-14874",
+ "resource-uuid": "example-resource-uuid-val-49146"
+ }
+ ]
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json
new file mode 100644
index 0000000000..4b1f69aacf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json
@@ -0,0 +1,72 @@
+ {
+
+ "result": [{
+
+ "hostname": "8862-PserverHOSTNAME-LB1113",
+ "equipType": "JUNIPER UCPE",
+ "equipVendor": "JUNIPER",
+ "equipModel": "QFX51010-PNF",
+ "ipv4OamAddress": "192.168.5.199",
+ "serialNumber": "VX986001PNF",
+ "pserverId": "5715CE4F-8600-58E103FE60C79",
+ "internetTopology": "WAN",
+ "inMaint": false,
+ "resourceVersion": "1500495668780",
+ "pserverName2": "test81600",
+ "relationshipList": {
+ "relationship": [
+ {
+ "relatedTo": "vserver",
+ "relatedLink": "/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/8862-tenantl-LB1113/vservers/vserver/8862-Lvserver-LB1113",
+ "relationshipData": [
+ {
+ "relationshipKey": "cloud-region.cloud-owner",
+ "relationshipValue": "att-aic"
+ },
+ {
+ "relationshipKey": "cloud-region.cloud-region-id",
+ "relationshipValue": "AAIAIC25"
+ },
+ {
+ "relationshipKey": "tenant.tenant-id",
+ "relationshipValue": "8862-tenantl-LB1113"
+ },
+ {
+ "relationshipKey": "vserver.vserver-id",
+ "relationshipValue": "8862-Lvserver-LB1113"
+ }
+ ],
+ "relatedToProperty": [
+ {
+ "propertyKey": "vserver.vserver-name",
+ "propertyValue": "hjZAYKyl5LO"
+ }
+ ]
+ }
+ ]
+ },
+ "pinterfaces": {
+ "pinterface": [
+ {
+ "interfaceName": "ge-0/5/8",
+ "speedValue": "1",
+ "speedUnits": "GBPS",
+ "resourceVersion": "1500495668784",
+ "inMaint": false
+ },
+ {
+ "interfaceName": "ge-1/5/8",
+ "speedValue": "1",
+ "speedUnits": "GBPS",
+ "resourceVersion": "1500495668788",
+ "inMaint": false
+ }
+ ]
+ }
+ }
+
+
+
+ ]
+}
+ \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json
new file mode 100644
index 0000000000..d79137b0cd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json
@@ -0,0 +1,27 @@
+{
+ "vf-module-id": "example-vnf-id-val-90603",
+ "vf-module-name": "example-vnf-name-val-56838",
+ "vnf-name2": "example-vnf-name2-val-56319",
+ "vnf-type": "example-vnf-type-val-30533",
+ "service-id": "example-service-id-val-28290",
+ "regional-resource-zone": "example-regional-resource-zone-val-11059",
+ "prov-status": "example-prov-status-val-59777",
+ "operational-status": "example-operational-status-val-22513",
+ "in-maint": true,
+
+ "equipment-role": "example-equipment-role-val-23396",
+ "orchestration-status": "example-orchestration-status-val-59435",
+ "heat-stack-id": "example-heat-stack-id-val-96869",
+ "mso-catalog-key": "example-mso-catalog-key-val-30721",
+ "management-option": "example-management-option-val-61927",
+ "ipv4-oam-address": "192.168.10.14",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-87072",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-91063",
+ "management-v6-address": "example-management-v6-address-val-80466",
+ "vcpu": 45837298,
+ "vcpu-units": "example-vcpu-units-val-86249",
+ "vmemory": 57288956,
+ "vmemory-units": "example-vmemory-units-val-13291",
+ "vdisk": 16937143,
+ "vdisk-units": "example-vdisk-units-val-73197"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json
new file mode 100644
index 0000000000..2f97b47dd3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json
@@ -0,0 +1,10 @@
+{
+ "id" : "something",
+ "resource-version" : "1234",
+ "plural" : {
+ "singular" : [{
+ "id" : "something2",
+ "resource-version" : "5678"
+ }]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json
new file mode 100644
index 0000000000..e28878d1aa
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json
@@ -0,0 +1,21 @@
+{
+ "output": {
+ "status": {
+ "code": 200,
+ "message": "RESULT_MESSAGE"
+ },
+ "common-header": {
+ "api-ver": "API_VERSION",
+ "request-id": "ECOMP_REQUEST_ID",
+ "originator-id": "ECOMP_SYSTEM_ID",
+ "sub-request-id": "ECOMP_SUBREQUEST_ID",
+ "timestamp": "2016-08-08T23:09:00.11Z",
+ "flags": {
+ "ttl": 1000,
+ "force": "TRUE",
+ "mode": "EXCLUSIVE"
+ }
+ },
+ "locked": "TRUE"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml
new file mode 100644
index 0000000000..34079bd23f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml
@@ -0,0 +1,75 @@
+<createNetworkRequest>
+ <cloudSiteId>mtn6</cloudSiteId>
+ <tenantId>0422ffb57ba042c0800a29dc85ca70f8</tenantId>
+ <networkId>8d35a433-c1db-4d54-a611-6de10aeb76f9</networkId>
+ <networkName>Dev_Bindings_1802_1311</networkName>
+ <networkType>CONTRAIL30_BASIC</networkType>
+ <modelCustomizationUuid>f1fc12e8-afe4-4716-954d-ed4d21a480ad</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>tbd</physicalNetworkName>
+ <vlans/>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>
+ <routeTarget>2001:051111</routeTarget>
+ <routeTargetRole>EXPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051113</routeTarget>
+ <routeTargetRole>IMPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051112</routeTarget>
+ <routeTargetRole>BOTH</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051115</routeTarget>
+ <routeTargetRole>EXPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051114</routeTarget>
+ <routeTargetRole>IMPORT</routeTargetRole>
+ </routeTargets>
+ <policyFqdns>default-domain:ECOMP_MSO_DND:MSOPolicyD</policyFqdns>
+ <policyFqdns>default-domain:ECOMP_MSO_DND:MSOPolicyC</policyFqdns>
+ <routeTableFqdns/>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start>107.118.41.3</start>
+ <end>107.118.41.45</end>
+ </allocationPools>
+ <cidr>107.118.41.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.118.41.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnetId>
+ <subnetName/>
+ <addrFromStart>true</addrFromStart>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start>107.118.42.3</start>
+ <end>107.118.42.45</end>
+ </allocationPools>
+ <cidr>107.118.42.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.118.42.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnetId>
+ <subnetName/>
+ <addrFromStart>true</addrFromStart>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>3d35ca0c-2da5-4f60-84d9-3e005de335c0</requestId>
+ <serviceInstanceId>f1d1c7da-fc42-4c31-866e-cfe963e55723</serviceInstanceId>
+ </msoRequest>
+ <messageId>d4515ea9-2852-4d3a-b424-9d7b6cf69d8e</messageId>
+ <notificationUrl/>
+</createNetworkRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml
new file mode 100644
index 0000000000..607dd5af92
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml
@@ -0,0 +1,31 @@
+<createNetworkResponse>
+ <messageId>d4515ea9-2852-4d3a-b424-9d7b6cf69d8e</messageId>
+ <networkCreated>true</networkCreated>
+ <networkFqdn>default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_1311</networkFqdn>
+ <networkId>8d35a433-c1db-4d54-a611-6de10aeb76f9</networkId>
+ <networkStackId>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</networkStackId>
+ <neutronNetworkId>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutronNetworkId>
+ <rollback>
+ <cloudId>mtn6</cloudId>
+ <modelCustomizationUuid>f1fc12e8-afe4-4716-954d-ed4d21a480ad</modelCustomizationUuid>
+ <msoRequest>
+ <requestId>3d35ca0c-2da5-4f60-84d9-3e005de335c0</requestId>
+ <serviceInstanceId>f1d1c7da-fc42-4c31-866e-cfe963e55723</serviceInstanceId>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkStackId>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</networkStackId>
+ <networkType>CONTRAIL30_BASIC</networkType>
+ <neutronNetworkId>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutronNetworkId>
+ <tenantId>0422ffb57ba042c0800a29dc85ca70f8</tenantId>
+ </rollback>
+ <subnetMap>
+ <entry>
+ <key>9dbb9e7e-fe18-421f-bad6-2305bd282471</key>
+ <value>27d414c7-1076-4595-aa45-4717ee992cef</value>
+ </entry>
+ <entry>
+ <key>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</key>
+ <value>db64710c-fbbc-4dc9-8109-3925b87268fa</value>
+ </entry>
+ </subnetMap>
+</createNetworkResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json
new file mode 100644
index 0000000000..dda149a560
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json
@@ -0,0 +1,10 @@
+{
+ "networkTechnology": "NEUTRON",
+ "failIfExists": false,
+ "backout": true,
+ "networkParams": [],
+ "msoRequest": {},
+ "contrailRequest": false,
+ "skipAAI": false,
+ "synchronous": true
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json
new file mode 100644
index 0000000000..d5d234cbf6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json
@@ -0,0 +1,226 @@
+{
+ "sharedNetwork": false,
+ "boundToVpn": false,
+ "externalNetwork": false,
+ "providerNetwork": false,
+ "network-id": "TEST_NETWORK_ID",
+ "cascaded": false,
+ "cloud-params": null,
+ "network-name": "TEST_NETWORK_NAME",
+ "is-bound-to-vpn": false,
+ "service-id": null,
+ "network-role-instance": null,
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "widget-model-id": null,
+ "widget-model-version": null,
+ "physical-network-name": null,
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "self-link": null,
+ "operational-status": null,
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "400d286b-7e44-4514-b9b3-f70f7360ff32",
+ "route-prefix": "172.20.1.0/24",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857300987"
+ },
+ {
+ "host-route-id": "6f038013-8b15-4eb8-914b-507489fbc8ee",
+ "route-prefix": "10.102.0.0/16",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857301151"
+ },
+ {
+ "host-route-id": "8811c5f8-f1ed-4fa0-a505-e1be60396e28",
+ "route-prefix": "192.168.2.0/25",
+ "next-hop": "10.102.200.1",
+ "resource-version": "1505857301954"
+ }
+ ]
+ }
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }
+ ]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [
+ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ },
+ "ctag-assignments": [
+ ],
+ "segmentation-assignments": [
+ ],
+ "model-info-network": null
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json
new file mode 100644
index 0000000000..aa6320801e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json
@@ -0,0 +1,216 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "400d286b-7e44-4514-b9b3-f70f7360ff32",
+ "route-prefix": "172.20.1.0/24",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857300987"
+ },
+ {
+ "host-route-id": "6f038013-8b15-4eb8-914b-507489fbc8ee",
+ "route-prefix": "10.102.0.0/16",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857301151"
+ },
+ {
+ "host-route-id": "8811c5f8-f1ed-4fa0-a505-e1be60396e28",
+ "route-prefix": "192.168.2.0/25",
+ "next-hop": "10.102.200.1",
+ "resource-version": "1505857301954"
+ }
+ ]
+ }
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }
+ ]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [
+ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json
new file mode 100644
index 0000000000..5addff2d70
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mtn6",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "3.0",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json
new file mode 100644
index 0000000000..fadbf9c244
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mtn6",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "2.5",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json
new file mode 100644
index 0000000000..97611c1d62
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "ERROR",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "3.0",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json
new file mode 100644
index 0000000000..181494dff2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json
@@ -0,0 +1,141 @@
+{
+ "network-id": "467e3349-bec1-4922-bcb1-d0bb041bce30",
+ "network-name": "vprobes_pktinternal_net_4_1806",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "NetworkPktinternalInt2.pktinternal_int",
+ "network-technology": "",
+ "is-bound-to-vpn": false,
+ "service-id": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468",
+ "network-role-instance": 0,
+ "resource-version": "1527285069624",
+ "orchestration-status": "Assigned",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/eb68dedb-840d-4bd4-a745-d9fcd8fc8468/service-data/networks/network/467e3349-bec1-4922-bcb1-d0bb041bce30/network-data/network-topology/",
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "46aee427-3aa0-4c1f-beb6-edf6caae2dc1",
+ "subnet-name": "vprobes_pktinternal_net_4_1806_subnet_1",
+ "gateway-address": "192.168.224.1",
+ "network-start-address": "192.168.224.0",
+ "cidr-mask": "21",
+ "ip-version": "4",
+ "orchestration-status": "PendingCreate",
+ "dhcp-enabled": false,
+ "dhcp-start": "192.168.224.3",
+ "dhcp-end": "192.168.224.5",
+ "subnet-role": "DHCP",
+ "ip-assignment-direction": "true",
+ "resource-version": "1527285068387",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "1de02743-580a-4f99-8285-3ba6eadb0892",
+ "route-prefix": "",
+ "next-hop": "",
+ "resource-version": "1527285059650"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Mobility/service-instances/service-instance/eb68dedb-840d-4bd4-a745-d9fcd8fc8468",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "Mobility"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/DYH1A",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "DYH1A"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "lcp"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/DYH1A/tenants/tenant/2871503957144f72b3cf481b379828ec",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "DYH1A"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "2871503957144f72b3cf481b379828ec"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "APP-C-24595-T-IST-04A"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/vpn-bindings/vpn-binding/13e94b71-3ce1-4988-ab0e-61208fc91f1c",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "13e94b71-3ce1-4988-ab0e-61208fc91f1c"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "vMDNS"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json
new file mode 100644
index 0000000000..b22f389c40
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json
@@ -0,0 +1,166 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }],
+ "related-to-property": [ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {"property-key": "vpn-binding.vpn-type"}
+ ]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json
new file mode 100644
index 0000000000..c581e54ef0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json
@@ -0,0 +1,53 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": []
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json
new file mode 100644
index 0000000000..5d9231d4c6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json
@@ -0,0 +1,891 @@
+{
+ "vpn-id": "13e94b71-3ce1-4988-ab0e-61208fc91f1c",
+ "vpn-name": "vMDNS",
+ "resource-version": "1510956324462",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/b3376949-5487-4a74-9029-332c07720c07",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b3376949-5487-4a74-9029-332c07720c07"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_hsl_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/d0b8ecd3-aee4-48ba-8bc5-222d3fb08162",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d0b8ecd3-aee4-48ba-8bc5-222d3fb08162"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/34305bd0-ad54-4349-8567-6f65ea09e750",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "34305bd0-ad54-4349-8567-6f65ea09e750"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vEPDG-FN_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/dfa4972a-ed82-43cd-98be-ed73bb3406a9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "dfa4972a-ed82-43cd-98be-ed73bb3406a9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_EXN_INTERNET_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/93556256-aa23-449d-a2fd-3a9c034f232a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "93556256-aa23-449d-a2fd-3a9c034f232a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7ce01c3a-5998-4908-85f6-ab29bc507a92",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7ce01c3a-5998-4908-85f6-ab29bc507a92"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_CORE-NSD-TOAM0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/016d3722-999b-4133-b4e6-8a1088bab664",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "016d3722-999b-4133-b4e6-8a1088bab664"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND-vepdg-FN-Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/80038196-9eae-452c-ad06-1f3fef1bef9f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "80038196-9eae-452c-ad06-1f3fef1bef9f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN-26071-T-BE-01_cdr_direct_net420"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f5f38447-dc62-4969-90a3-c60474f9c0ac",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f5f38447-dc62-4969-90a3-c60474f9c0ac"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_3"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/58b374aa-01ca-4a39-99b9-889c2f7ae908",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "58b374aa-01ca-4a39-99b9-889c2f7ae908"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_OAM_MGMT_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/efe0dfca-18e7-4992-a63a-041b9f8271e0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "efe0dfca-18e7-4992-a63a-041b9f8271e0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_APN-dns_int_apn_dns_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/dab7e704-6a6e-4c53-9a80-fb5857a43b6f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "dab7e704-6a6e-4c53-9a80-fb5857a43b6f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/634653b3-9084-41d9-ad6a-40863a3d666f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "634653b3-9084-41d9-ad6a-40863a3d666f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01A_int_fw_dns_trusted_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6117b35e-c029-4308-85e6-007c24014484",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6117b35e-c029-4308-85e6-007c24014484"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-D-T001_vprobes_int_mgmt_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/eb1ce51b-d10f-4b08-9166-345335b9f73b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "eb1ce51b-d10f-4b08-9166-345335b9f73b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_OAMP_NSD_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/468f83be-4abb-4901-950b-e399b77a09a0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "468f83be-4abb-4901-950b-e399b77a09a0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_IRPR-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/103d17dc-6575-427c-a2c1-301493e08ec0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "103d17dc-6575-427c-a2c1-301493e08ec0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_segw_hsl_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/305214f8-64be-4209-8a0d-10b6dfb77dd1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "305214f8-64be-4209-8a0d-10b6dfb77dd1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vMDS_FN_int_fw_dns_trusted_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7989a6d2-ba10-4a5d-8f15-4520bc833090",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7989a6d2-ba10-4a5d-8f15-4520bc833090"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02AShared_cor_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f040ebf4-76ad-4b05-a766-1deec26549ae",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f040ebf4-76ad-4b05-a766-1deec26549ae"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_gn_untrusted_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/26d6038b-4b9e-4fe5-bcff-9af7586651cc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "26d6038b-4b9e-4fe5-bcff-9af7586651cc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-D-T001_vprobes_pktinternal_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/9e78d3f4-85b5-40b8-803e-c3a0ab6d6165",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9e78d3f4-85b5-40b8-803e-c3a0ab6d6165"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_MNS_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/a2de22f9-eb91-452e-aff5-e81a1a679ef6",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "a2de22f9-eb91-452e-aff5-e81a1a679ef6"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_GN_DIRECT_NET_01"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6d6b7254-72d2-4731-80d6-8e8375d959e9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6d6b7254-72d2-4731-80d6-8e8375d959e9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VDBE-PED-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/21819ac4-95c4-490f-ba7c-0ad92920f805",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "21819ac4-95c4-490f-ba7c-0ad92920f805"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_FN_int_pktinternal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/98ff6827-320a-4b71-bd2b-df2bd20b6855",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "98ff6827-320a-4b71-bd2b-df2bd20b6855"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_oam_protected_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/e229ab86-279c-4505-a08a-91e373293e20",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e229ab86-279c-4505-a08a-91e373293e20"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_OAM_DIRECT_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/bb722f93-2d1a-42a5-bd11-57ad30ff1085",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "bb722f93-2d1a-42a5-bd11-57ad30ff1085"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_segw_hsl_direct_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0399443d-1fc6-42a6-934c-77030d751916",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0399443d-1fc6-42a6-934c-77030d751916"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VDBE-PED-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/d259ec74-304d-4bd2-bbd6-93c201acba42",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d259ec74-304d-4bd2-bbd6-93c201acba42"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A__vprobes_int_mgmt_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f69fb458-e2bd-4d0f-9a47-430d18cbebfd",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f69fb458-e2bd-4d0f-9a47-430d18cbebfd"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN-26071-T-BE-01_cdr_direct_net4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0f18b91f-ee79-403b-a081-8c0a89650641",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0f18b91f-ee79-403b-a081-8c0a89650641"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN_int_pktinternal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/90fdbbbb-42bb-41ff-9356-db245466a4fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "90fdbbbb-42bb-41ff-9356-db245466a4fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0e66adce-d5dd-4968-bcb2-83f0281424db",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0e66adce-d5dd-4968-bcb2-83f0281424db"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_VDBF-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/db572383-dbd7-4d5e-93cb-8c7c1d209a90",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "db572383-dbd7-4d5e-93cb-8c7c1d209a90"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_TRST_VIF_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/478b7f86-8544-48e5-95f1-568dfd18730d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "478b7f86-8544-48e5-95f1-568dfd18730d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_GN_DIRECT_NET_01"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0f725895-5224-4016-b49a-d9d016eaafff",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0f725895-5224-4016-b49a-d9d016eaafff"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/9cd47b0c-ee58-46f0-9ec5-b4db504dd59b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9cd47b0c-ee58-46f0-9ec5-b4db504dd59b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-FN-25180-T-01Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f95259c9-f5c6-4861-a9f4-b6eec199b33f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f95259c9-f5c6-4861-a9f4-b6eec199b33f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/caf98ee4-2496-4c92-a41c-b6a50efcc29f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "caf98ee4-2496-4c92-a41c-b6a50efcc29f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_MGM-CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/754739cb-5371-4d5b-a02a-489587d17443",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "754739cb-5371-4d5b-a02a-489587d17443"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8cd7add8-0cfc-4f65-bbf8-d0f25a0dbc70",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8cd7add8-0cfc-4f65-bbf8-d0f25a0dbc70"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VDBE-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7093921f-bed8-4866-bb3c-a2b8c376ca69",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7093921f-bed8-4866-bb3c-a2b8c376ca69"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VIRPR-TDAT0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/691da8b2-805e-4dd1-aaf5-b0e37414c662",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "691da8b2-805e-4dd1-aaf5-b0e37414c662"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_int_pktmirror_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/00eaa0b3-90df-4b43-a850-9d30abb7fded",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "00eaa0b3-90df-4b43-a850-9d30abb7fded"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01AShared_oam_protected_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6ba57200-c61a-46be-821b-88b3fa169b66",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ba57200-c61a-46be-821b-88b3fa169b66"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_3"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8e32ec2c-47a1-4514-b21a-2806e23f0437",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8e32ec2c-47a1-4514-b21a-2806e23f0437"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKENb_VDBF-PSD-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/a755ddd0-512a-444d-9f38-97b3eff70f85",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "a755ddd0-512a-444d-9f38-97b3eff70f85"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_UNTR_VSE_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c7bde85d-1c12-467c-ae6f-57bdf5c1d380",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7bde85d-1c12-467c-ae6f-57bdf5c1d380"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKENb_VDBF-PSD-DMZ0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0933fcec-9e78-4045-a21a-8258e18cb78e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0933fcec-9e78-4045-a21a-8258e18cb78e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vdbe_oam_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6a26a729-d9ce-4619-a20e-38597205ba7d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6a26a729-d9ce-4619-a20e-38597205ba7d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c1a06665-518b-408b-bfe0-8f393204baf6",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1a06665-518b-408b-bfe0-8f393204baf6"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/fb51398b-7622-4570-9bd6-e29c82621d44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb51398b-7622-4570-9bd6-e29c82621d44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/92072731-1c40-45c2-a218-5e75b713b312",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92072731-1c40-45c2-a218-5e75b713b312"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_TRST_VIF_ISBC0_net_0001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c6d94632-fd6b-4bfe-993e-377b0368476b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c6d94632-fd6b-4bfe-993e-377b0368476b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01AShared_int_ha_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/84516ef3-e371-4039-908e-83cd2b55a4a1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "84516ef3-e371-4039-908e-83cd2b55a4a1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "VPMS-FN-26071-T-BE-01_vprobes_int_mgmt_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/2c4f3adc-1a45-4484-8fb6-9eeac99eb922",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "2c4f3adc-1a45-4484-8fb6-9eeac99eb922"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VDBE-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/1fea0624-dac2-4997-904d-34ca1bc12fa9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1fea0624-dac2-4997-904d-34ca1bc12fa9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02AShared_cps_internal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8ab98982-05b7-45b2-828d-648da3d6cc0f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8ab98982-05b7-45b2-828d-648da3d6cc0f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_swu_direct_fn_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c8934d59-24a8-41cc-af9d-2026ef261843",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c8934d59-24a8-41cc-af9d-2026ef261843"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_protected_net_vrar_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c741fe5b-bf27-4ad9-b30d-20518e115495",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c741fe5b-bf27-4ad9-b30d-20518e115495"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_int_apn_dns_fn_net_PB_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8285fbae-ec25-44f7-ac52-89a968d45a2b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8285fbae-ec25-44f7-ac52-89a968d45a2b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-T2B_vEPDG-FN_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/65e6d4b0-0c96-4bfa-bdd6-2baa16df322a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65e6d4b0-0c96-4bfa-bdd6-2baa16df322a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vEPDG-FN_gn_untrusted_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/38e51c7b-adc2-491a-a036-3189645b007c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "38e51c7b-adc2-491a-a036-3189645b007c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_2_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/4d210b09-b6ce-41b3-95a6-5e4dffea9ca2",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4d210b09-b6ce-41b3-95a6-5e4dffea9ca2"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_3_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c5df1c57-3c85-4abc-973f-a1ffb13e391a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c5df1c57-3c85-4abc-973f-a1ffb13e391a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/467e3349-bec1-4922-bcb1-d0bb041bce30",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "467e3349-bec1-4922-bcb1-d0bb041bce30"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_4_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/1596f4d2-66b5-4627-96f2-c26794154530",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1596f4d2-66b5-4627-96f2-c26794154530"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_2"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml
new file mode 100644
index 0000000000..6dd91c64c9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml
@@ -0,0 +1,145 @@
+<l3-network xmlns="http://org.onap.aai.inventory/v11">
+ <network-id>8d35a433-c1db-4d54-a611-6de10aeb76f9</network-id>
+ <network-name>Dev_Bindings_1802_1311</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>true</is-bound-to-vpn>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1517430804756</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>tbd</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnet-id>
+ <subnet-name />
+ <gateway-address>107.118.41.1</gateway-address>
+ <network-start-address>107.118.41.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.41.3</dhcp-start>
+ <dhcp-end>107.118.41.45</dhcp-end>
+ <subnet-role />
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <resource-version>1517430804770</resource-version>
+ </subnet>
+ <subnet>
+ <subnet-id>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnet-id>
+ <subnet-name />
+ <gateway-address>107.118.42.1</gateway-address>
+ <network-start-address>107.118.42.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.42.3</dhcp-start>
+ <dhcp-end>107.118.42.45</dhcp-end>
+ <subnet-role />
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <resource-version>1517430804782</resource-version>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/f1d1c7da-fc42-4c31-866e-cfe963e55723</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_dev</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>f1d1c7da-fc42-4c31-866e-cfe963e55723</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>MSO-DEV-SI-1802-v6-1-31-nwk1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>LCP</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>0422ffb57ba042c0800a29dc85ca70f8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MSO_DND</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>0219d83f-7c4a-48e2-b8fc-9b20459356bc</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyD</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>e7a3560c-8b29-4611-a404-83af0b31ce64</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyC</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>MSO_VPN_TEST</property-value>
+ </related-to-property>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-type</property-key>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json
new file mode 100644
index 0000000000..f076c9044c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json
@@ -0,0 +1,162 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }]
+ },
+ {
+ "related-to": "vf-module",
+ "related-link": "aai/v11/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "105df7e5-0b3b-49f7-a837-4864b62827c4"
+ },
+ {
+ "relationship-key": "vf-module.vf-module-id",
+ "relationship-value": "d9217058-95a0-49ee-b9a9-949259e89349"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }],
+ "related-to-property": [ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {"property-key": "vpn-binding.vpn-type"}
+ ]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml
new file mode 100644
index 0000000000..92fec2dc64
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml
@@ -0,0 +1,149 @@
+<l3-network xmlns="http://org.onap.aai.inventory/v11">
+ <network-id>8d35a433-c1db-4d54-a611-6de10aeb76f9</network-id>
+ <network-name>Dev_Bindings_1802_1311</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutron-network-id>
+ <is-bound-to-vpn>true</is-bound-to-vpn>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1517430804756</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <heat-stack-id>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</heat-stack-id>
+ <contrail-network-fqdn>default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_1311</contrail-network-fqdn>
+ <physical-network-name>tbd</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnet-id>
+ <neutron-subnet-id>27d414c7-1076-4595-aa45-4717ee992cef</neutron-subnet-id>
+ <gateway-address>107.118.41.1</gateway-address>
+ <network-start-address>107.118.41.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.41.3</dhcp-start>
+ <dhcp-end>107.118.41.45</dhcp-end>
+ <resource-version>1517430804770</resource-version>
+ <subnet-name/>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ </subnet>
+ <subnet>
+ <subnet-id>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnet-id>
+ <neutron-subnet-id>db64710c-fbbc-4dc9-8109-3925b87268fa</neutron-subnet-id>
+ <gateway-address>107.118.42.1</gateway-address>
+ <network-start-address>107.118.42.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.42.3</dhcp-start>
+ <dhcp-end>107.118.42.45</dhcp-end>
+ <resource-version>1517430804782</resource-version>
+ <subnet-name/>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/f1d1c7da-fc42-4c31-866e-cfe963e55723</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_dev</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>f1d1c7da-fc42-4c31-866e-cfe963e55723</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>MSO-DEV-SI-1802-v6-1-31-nwk1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>LCP</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>0422ffb57ba042c0800a29dc85ca70f8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MSO_DND</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>0219d83f-7c4a-48e2-b8fc-9b20459356bc</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyD</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>e7a3560c-8b29-4611-a404-83af0b31ce64</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyC</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>MSO_VPN_TEST</property-value>
+ </related-to-property>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-type</property-key>
+ <property-value/>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf
new file mode 100644
index 0000000000..09634c199b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf
@@ -0,0 +1,107 @@
+{
+ "transactionId": "testRequestId",
+ "requestId": "testRequestId",
+ "requestState": "complete",
+ "statusMessage": "",
+ "solutionInfo": {
+ "licenseInfo": [
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_primary_1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "entitlementPoolList": [
+ "91d563e8-e714-4393-8f99-cc480144a05e",
+ "21d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "31d563e8-e714-4393-8f99-cc480144a05e",
+ "71d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_secondary_1",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ],
+ "placementInfo": [
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "MDTNJ01"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "KDTNJ01"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "dfwtx",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostname2"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId2",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID2",
+ "serviceResourceId": "testResourceIdAR2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli3"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId3",
+ "inventoryType": "cloud",
+ "resourceModuleName": "VNF",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net
new file mode 100644
index 0000000000..ac9b466ab7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net
@@ -0,0 +1,165 @@
+{
+ "transactionId": "testRequestId",
+ "requestId": "testRequestId",
+ "requestState": "complete",
+ "statusMessage": "",
+ "solutionInfo": {
+ "licenseInfo": [
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_primary_1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05n",
+ "j1d563e8-e714-4393-8f99-cc480144a05n"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05n",
+ "b1d563e8-e714-4393-8f99-cc480144a05n"
+ ],
+ "resourceModuleName": "net",
+ "serviceResourceId": "testResourceIdNet2"
+ },
+ {
+ "entitlementPoolList": [
+ "91d563e8-e714-4393-8f99-cc480144a05e",
+ "21d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "31d563e8-e714-4393-8f99-cc480144a05e",
+ "71d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_secondary_1",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ],
+ "placementInfo": [
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "MDTNJ01"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "KDTNJ01"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "dfwtx",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostname2"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId2",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID2",
+ "serviceResourceId": "testResourceIdAR2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostNameNet"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClliNet"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionIdNet",
+ "inventoryType": "service",
+ "resourceModuleName": "NETWORK",
+ "serviceInstanceId": "testServiceInstanceIdNet",
+ "serviceResourceId": "testResourceIdNet"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClliNet2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionIdNet2",
+ "inventoryType": "cloud",
+ "resourceModuleName": "NETWORK",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdNet2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli3"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId3",
+ "inventoryType": "cloud",
+ "resourceModuleName": "VNF",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound
new file mode 100644
index 0000000000..2150a053fb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound
@@ -0,0 +1,15 @@
+{
+ "requestState": "",
+ "responseTime": "",
+ "solutionInfo": {
+ "placementInfo": [],
+ "licenseInfo": {
+ "featureGroupId": ""
+ }
+ },
+ "percentProgress": "",
+ "requestId": "02c2e322-5839-4c97-9d46-0a5fa6bb642e",
+ "startTime": "",
+ "statusMessage": "No solution found for plan 08e1b8cf-144a-4bac-b293-d5e2eedc97e8",
+ "requestType": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException
new file mode 100644
index 0000000000..b82688428e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException
@@ -0,0 +1,9 @@
+{
+ "requestError": {
+ "policyException": {
+ "requestId": "ae81d9a8-c949-493a-999c-f76c80503233",
+ "text": "Message content size exceeds the allowable limit",
+ "messageId": "SVC0001"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException
new file mode 100644
index 0000000000..6cc78a7cdb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException
@@ -0,0 +1,12 @@
+{
+ "requestError": {
+ "serviceException": {
+ "variables": [
+ "severity", 400
+ ],
+ "requestId": "ae81d9a8-c949-493a-999c-f76c80503233",
+ "text": "SNIROPlacementError: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://135.21.171.200:8091/v1/plans/97b4e303-5f75-492c-8fb2-21098281c8b8",
+ "messageId": "SVC0001"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..9b651f25e3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>3.0</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</createNetworkError>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
new file mode 100644
index 0000000000..02996a13ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
@@ -0,0 +1,80 @@
+<html>
+ <head>
+ <title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report
+ </title>
+ <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
+ H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
+ B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
+ P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
+ {color : black;}A.name {color : black;}HR {color : #525D76;} -->
+ </style>
+ </head>
+ <body>
+ <h1>JBWEB000065: HTTP Status 500 - java.lang.NullPointerException</h1>
+ <HR size="1" noshade="noshade" />
+ <p>
+ <b>JBWEB000309: type</b>
+ JBWEB000066: Exception report
+ </p>
+ <p>
+ <b>JBWEB000068: message</b>
+ <u>java.lang.NullPointerException</u>
+ </p>
+ <p>
+ <b>JBWEB000069: description</b>
+ <u>JBWEB000145: The server encountered an internal error that
+ prevented it from fulfilling this request.
+ </u>
+ </p>
+ <p>
+ <b>JBWEB000070: exception</b>
+ <pre>org.jboss.resteasy.spi.UnhandledException:
+ java.lang.NullPointerException
+ org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.onap.so.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.onap.so.adapters.network.NetworkAdapterRest.createNetwork(NetworkAdapterRest.java:64)
+ sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ java.lang.reflect.Method.invoke(Method.java:606)
+ org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
+ org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000072: note</b>
+ <u>JBWEB000073: The full stack trace of the root cause is available
+ in the JBoss Web/7.2.2.Final-redhat-1 logs.
+ </u>
+ </p>
+ <HR size="1" noshade="noshade" />
+ <h3>JBoss Web/7.2.2.Final-redhat-1</h3>
+ </body>
+</html> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
new file mode 100644
index 0000000000..90177f1c6d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:createNetworkResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..ca5145c226
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
@@ -0,0 +1,4 @@
+<result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
+</result-data> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..d6f7737a2a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4_3</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
new file mode 100644
index 0000000000..03b37814b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
@@ -0,0 +1,74 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>active</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>404</rest:errorCode>
+ <rest:message>HTTP method: GET Not Found </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3001&lt;/messageId&gt;
+ &lt;text&gt;Resource not found for %1 using id %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;GETl3Networks&lt;/variable&gt;
+ &lt;variable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
+ &lt;variable&gt;Node Not Found:No Node of type l3Network found for properties: (network-id = null)&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.6114&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..4eadb1061e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>404</rest:errorCode>
+ <rest:message>HTTP method: GET Not Found </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3001&lt;/messageId&gt;
+ &lt;text&gt;Resource not found for %1 using id %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;GETl3Networks&lt;/variable&gt;
+ &lt;variable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
+ &lt;variable&gt;Node Not Found:No Node of type l3Network found for properties: (network-id = null)&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.6114&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..e06d27ea88
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..6e319c4c73
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
@@ -0,0 +1,110 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..79cc14ada3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>13979:105757</heat-stack-id>
+ <resource-version>13979:105757</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..db134a1127
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..34b4a036c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c01d0a4f61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml
@@ -0,0 +1,57 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <route-targets>
+ <route-target>
+ <global-route-target>13979:105708</global-route-target>
+ <route-target-role>EXPORT</route-target-role>
+ <resource-version>1504025599510</resource-version>
+ </route-target>
+ <route-target>
+ <global-route-target>13979:105707</global-route-target>
+ <route-target-role>IMPORT</route-target-role>
+ <resource-version>1504025599519</resource-version>
+ </route-target>
+ </route-targets>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5f1c2cafa5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
@@ -0,0 +1,46 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<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/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml
new file mode 100644
index 0000000000..4f87e1a1da
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>79ec9006-3695-4fcc-93a8-be6f9e248beb</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;output xmlns="org:onap:sdnc:northbound:generic-resource"&gt;&lt;response-message&gt;&lt;/response-message&gt;&lt;svc-request-id&gt;79ec9006-3695-4fcc-93a8-be6f9e248beb&lt;/svc-request-id&gt;&lt;service-response-information&gt;&lt;instance-id&gt;f805ec2b-b4d8-473e-8325-67f110139e5d&lt;/instance-id&gt;&lt;/service-response-information&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;network-response-information&gt;&lt;instance-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/instance-id&gt;&lt;object-path&gt;restconf/config/GENERIC-RESOURCE-API:services/service/f805ec2b-b4d8-473e-8325-67f110139e5d/service-data/networks/network/f7e4db56-aab5-4065-8e65-cec1cd1de24f&lt;/object-path&gt;&lt;/network-response-information&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..836b3c8055
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json
new file mode 100644
index 0000000000..45b09a1f59
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json
@@ -0,0 +1,42 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "Test",
+"modelVersion": "1.0"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+},
+"owningEntity": {
+"owningEntityId": "a",
+"owningEntityName": "a"
+},
+"project": {
+"projectName": "temp project"
+},
+"subscriberInfo": {
+"globalSubscriberId": "some subscriber id",
+"subscriberName": "some subscriber name"
+},
+"requestInfo": {
+"productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+"source": "VID",
+"suppressRollback": true,
+"requestorId": "xxxxxx"
+},
+"requestParameters": {
+"subscriptionServiceType": "MOG",
+"aLaCarte": false,
+"userParams": [
+{
+"name": "someUserParam",
+"value": "someValue"
+}
+]
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json
new file mode 100644
index 0000000000..e7960b7273
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json
@@ -0,0 +1,36 @@
+{
+ "requestDetails": {
+ "serviceInstance": {
+ "serviceInstanceId": "MSORefactorTest3",
+ "serviceInstanceName": "bensServiceInstance3",
+ "serviceType": "MSO-dev-service-type",
+ "serviceRole": "abc",
+ "modelInvariantUuid": "d214abcc-2083-11e7-93ae-92361f002671",
+ "modelUuid": "c4503baa-2083-11e7-93ae-92361f002671",
+ "modelVersion": "1.0",
+ "modelName": "MSOTADevInfra_vSAMP12_Service",
+ "environmentContext": "Luna",
+ "workloadContext": "Oxygen",
+ "orchestrationStatus": "ACTIVE"
+ },
+ "project": {
+ "projectName": "vSAMP12 Project"
+ },
+ "owningEntity": {
+ "owningEntityId": "MSO-Test-OE",
+ "owningEntityName": "MSO-Test123"
+ },
+ "customer": {
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "globalSubscriberId": "MSO_1610_dev"
+ },
+ "request": {
+ "sdncRequestId": "736c7370-640b-4f7a-975d-320f73340dd3",
+ "callbackURL": "abc",
+ "requestId": "223c2e74-a23a-4ab8-bddb-2c2431dcb67f",
+ "productFamilyId": "abc",
+ "callbackUrl": "http://localhost:8080/adapters/rest/SDNCNotify",
+ "serviceId": "123"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<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/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..be820b83b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse
+ xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked" />
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT" />
+ <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:502-132671" />
+ <rest:header name="Content-Type" value="application/xml" />
+ <rest:header name="Server" value="Apache-Coyote/1.1" />
+ <rest:header name="Cache-Control" value="private" />
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <customer xmlns="http://org.openecomp.aai.inventory/v8">
+ <global-customer-id>8310000058863</global-customer-id>
+ <subscriber-name>Mobility</subscriber-name>
+ <subscriber-type>INFRA</subscriber-type>
+ <resource-version>1452288058</resource-version>
+ <service-subscriptions>
+ <service-subscription>
+ <service-type>vMOG</service-type>
+ <resource-version>1452288058</resource-version>
+ <service-instances>
+ <service-instance>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <persona-model-id>gg0e927b-6087-5574-9ef8-c5e4d5847db5</persona-model-id>
+ <persona-model-version>V1.0</persona-model-version>
+ <service-instance-name>vMOG-AKRON-1234</service-instance-name>
+ <resource-version>1462561835</resource-version>
+ <relationship-list />
+ <metadata />
+ </service-instance>
+ </service-instances>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-conexus-e2e.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/396d61752cf04c3b8ca2afcb4ee049e9/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>396d61752cf04c3b8ca2afcb4ee049e9</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>vMOG-AKRON-PROD</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </service-subscription>
+ </service-subscriptions>
+ <relationship-list />
+ </customer>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml
new file mode 100644
index 0000000000..1ede44427a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<volumeGroupException>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <category>INTERNAL</category>
+ <message>Exception during create VF Create VF Module: Unable to determine specific VF Module Type: Nimbus_LU2_PXMC_Svc/PXMC_09_20_2016_v2 3::Pxmc09202016V2..pxmc_base.yaml..module-2 with version = 3.0</message>
+ <rolledBack>true</rolledBack>
+</volumeGroupException> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..34604f1edd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure/>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
new file mode 100644
index 0000000000..aea1a46017
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rollbackVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupRolledback>true</volumeGroupRolledback>
+</rollbackVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..6853daa4b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,71 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" },
+ {"name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
new file mode 100644
index 0000000000..de99a6da56
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..02b43ff186
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
new file mode 100644
index 0000000000..96e906f9bf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>94f0f72f-4be1-49ed-8410-702396797163</volume-group-id>
+ <volume-group-name>MSOTESTVOL103H-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1469203133</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/e444c311b27a45dc9522f2370d70f90f/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e444c311b27a45dc9522f2370d70f90f</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOCustomer1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..7aa9c3e8ac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,50 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <vf-module-model-customization-id>ee6478e5-ea33-3346-ac12-ab121484a3fe</vf-module-model-customization-id>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
new file mode 100644
index 0000000000..416689e10c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://org.openecomp.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/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml
new file mode 100644
index 0000000000..7e2a676283
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml
@@ -0,0 +1,62 @@
+<volume-group xmlns="http://com.att.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>MSOSTSAMP12-10601</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://localhost:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vf-module.vf-module-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json
new file mode 100644
index 0000000000..808e371191
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json
@@ -0,0 +1,77 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "aLaCarte": false,
+ "userParams": [{
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json
new file mode 100644
index 0000000000..b51741f879
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json
@@ -0,0 +1,79 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json
new file mode 100644
index 0000000000..68de099c16
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json
@@ -0,0 +1,77 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "aLaCarte": false,
+ "userParams": [{
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+ ]}
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0942e09e31
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml
new file mode 100644
index 0000000000..5a36d741d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml
@@ -0,0 +1 @@
+<DbTag>Notified</DbTag> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0ae5b79484
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap.so/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
new file mode 100644
index 0000000000..ca195324d3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
@@ -0,0 +1,7 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ &lt;output xmlns="org:onap:sdnctl:vnf"&gt;&lt;svc-request-id&gt;1660b8da-0a94-442d-8ed5-ea079e3c67c8&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;vnf-information&gt;&lt;vnf-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/vnf-id&gt;&lt;/vnf-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..9b651f25e3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>3.0</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml
new file mode 100644
index 0000000000..4ce7048950
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>500</rest:errorCode>
+ <rest:message>HTTP method: GET Internal Server Error </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3002&lt;/messageId&gt;
+ &lt;text&gt;Error writing output performing %1 on %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;PUT customer&lt;/variable&gt;
+ &lt;variable&gt;SubName32&lt;/variable&gt;
+ &lt;variable&gt;Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [12312442454112] violates a uniqueness constraint [service-instance-id]&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.5105&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml
new file mode 100644
index 0000000000..c12bcd49c9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml
@@ -0,0 +1,61 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>RDM2WAGPLCP</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml
new file mode 100644
index 0000000000..b108fb25ab
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml
@@ -0,0 +1,73 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://aai-app-e2e.ecomp.cci.com:8443/aai/v8/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>105df7e5-0b3b-49f7-a837-4864b62827c4</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>d9217058-95a0-49ee-b9a9-949259e89349</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/45f822d9-73ca-4255-9844-7cef401bbf47/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>45f822d9-73ca-4255-9844-7cef401bbf47</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>zrdm1scpx05</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..1d198caf5d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>19174929-3809-49ca-89eb-17f84a035389</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml
new file mode 100644
index 0000000000..bc0eab88a7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>19174929-3809-49ca-89eb-17f84a035389</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml
new file mode 100644
index 0000000000..74a3beb221
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteVfModuleResponse>
+ <messageId>86651f79-057e-4245-8f5f-174db3cef553-1502888133261</messageId>
+ <vfModuleDeleted>true</vfModuleDeleted>
+ <vfModuleId>20928949-5230-495d-86a6-f3690b9b5d60</vfModuleId>
+ <vfModuleOutputs>
+ <entry>
+ <key>shared_private_network_id</key>
+ <value>bcd04543-b3d7-4c64-a910-1735b875ebb2</value>
+ </entry>
+ <entry>
+ <key>server1_port</key>
+ <value>d1605e82-50ba-4544-9f8d-a8a37b678046</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>7da56895-6be1-4bec-856b-525e0e573199</value>
+ </entry>
+ </vfModuleOutputs>
+ <vnfId>7da56895-6be1-4bec-856b-525e0e573199</vnfId>
+</deleteVfModuleResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..25aa45afd9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupDeleted>true</volumeGroupDeleted>
+</deleteVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
new file mode 100644
index 0000000000..c6cc1ca428
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
@@ -0,0 +1,17 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "0b01b8c2-8416-11e6-ae22-56b6b6499611",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "source": "VID"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..fd10548cef
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -0,0 +1,42 @@
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>MSOSTSAMP12-10601</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json
new file mode 100644
index 0000000000..c75c32d498
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json
@@ -0,0 +1,50 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"modelNameVersionId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "MDTWNJ21",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "00000000-0000-0000-0000-000000000000",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml
new file mode 100644
index 0000000000..4aaa56f79a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml
@@ -0,0 +1,31 @@
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>test-VF-0011</request-id>
+ <action>CREATE_VF_MODULE</action>
+ <source>VID</source>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ </request-info>
+ <vnf-inputs>
+ <vnf-id>skask</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>myvnftype</vnf-type>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>
+ <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <service-id>00000000-0000-0000-0000-000000000000</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>
+ <volume-group-id>78987</volume-group-id>
+ </vnf-inputs>
+ <vnf-params xmlns:tns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ <param name="vnf_instance_name">STMTN5MMSC20</param>
+ <param name="tenant_id">vpe-tenant-123</param>
+ <param name="aic_cloud_region">MDTWNJ21</param>
+ <param name="is_avpn_service">false</param>
+ <param name="asn">asn-1234</param>
+ <param name="release_for_aero">release-for-aero-something</param>
+ <param name="aic_clli">MTJWNJA4LCP</param>
+ <param name="svc_provider_part_number">svc-provide-number-1234</param>
+ </vnf-params>
+</vnf-request> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml
new file mode 100644
index 0000000000..f78d38f802
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml
@@ -0,0 +1,169 @@
+<createVfModuleRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <vnfId>skask</vnfId>
+ <vnfName>skask-test</vnfName>
+ <vfModuleName>PCRF::module-0-2</vfModuleName>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vnfType>vRRaas</vnfType>
+ <vfModuleType>PCRF::module-0-2</vfModuleType>
+ <vnfVersion>1.0</vnfVersion>
+ <modelCustomizationUuid>cb510af0-5b21-4bc7-86d9-323cb396ced3</modelCustomizationUuid>
+ <requestType></requestType>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>null</volumeGroupStackId>
+ <baseVfModuleId>null</baseVfModuleId>
+ <baseVfModuleStackId>12345</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>12345</backout>
+ <failIfExists>true</failIfExists>
+ <vfModuleParams>
+ <entry>
+ <key>vf_module_id</key>
+ <value>cb510af0-5b21-4bc7-86d9-323cb396ce32</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>skask-test</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>workload_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>PCRF::module-0-2</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>skask</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_name</key>
+ <value>ADIG_SRIOV_2</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>environment_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_name</key>
+ <value>ADIGOAM.OAM</value>
+ </entry>
+ <entry>
+ <key>vrra_name_0</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_name</key>
+ <value>ADIG_SRIOV_1</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_names</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vf_module_index</key>
+ <value>index</value>
+ </entry>
+ <entry>
+ <key>availability_zone_0</key>
+ <value>frkde-esx-az01</value>
+ </entry>
+
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>MIS/1604/0026/SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <messageId>testRequestId-1503410089303-1513204371234</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMesssage/VNFAResponse/testRequestId-1503410089303-1513204371234</notificationUrl>
+</createVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml
new file mode 100644
index 0000000000..20b5462729
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml
@@ -0,0 +1,195 @@
+<response-data>
+ <tag0CallbackHeader>
+ <tag0RequestId>2681784d-118e-4485-929f-2ae3212f5c07-1507707098467</tag0RequestId>
+ <tag0ResponseCode>200</tag0ResponseCode>
+ <tag0ResponseMessage>OK</tag0ResponseMessage>
+ </tag0CallbackHeader>
+ <tag0RequestData>
+ <service-list>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ <service-status>
+ <response-code>200</response-code>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2017-09-19T143942.327Z</response-timestamp>
+ <final-indicator>Y</final-indicator>
+ <rpc-name>activate-vnf-request</rpc-name>
+ </service-status>
+ <service-data>
+ <service-information>
+ <service-type>vRRaaS</service-type>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ </service-information>
+ <request-information>
+ <request-id>ae322537-d081-4a01-95a5-c1448116d0c5</request-id>
+ </request-information>
+ <ipsec-tunnel-parameters/>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <availability-zones>
+ <availability-zone>frkde-esx-az01</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>vrra</vm-type>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network1</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT1</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT1</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network2</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT2</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT2</network-id>
+ </vm-networks>
+ <vm-names>
+ <vm-name>frkdevRvrra24</vm-name>
+ <vm-uuid>b05a42c3-28ea-4d18-8653-6515125acc1a</vm-uuid>
+ </vm-names>
+ </vnf-vms>
+ <vnf-status>Activated</vnf-status>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ </vnf-assignments>
+ </vnf-topology-information>
+ <generic-vnf-service>
+ <cloud-region-id>FRN1</cloud-region-id>
+ <outer-vlan-tag>4027</outer-vlan-tag>
+ <cloud-owner>att-aic</cloud-owner>
+ <service-ecomp-model-information>
+ <model-uuid>b73c6911-be64-448a-bb4b-7b7a7006507a</model-uuid>
+ <model-version>5.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE Service</model-name>
+ <model-invariant-uuid>d48764b1-043d-4783-89e3-8817602dc833</model-invariant-uuid>
+ </service-ecomp-model-information>
+ <as-number>65001</as-number>
+ <infra-service-instance-id>wl3900-1712-46db-99be-de9eb963a6cf26</infra-service-instance-id>
+ <country-code>DE</country-code>
+ <vnf-id>vnfID-1712_26</vnf-id>
+ <vnf-host-name>26VRR_mtrnj151rv2</vnf-host-name>
+ <vf-module-ecomp-model-information>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>778c2ed5-77a8-426e-94fe-51a4d40199c4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>cb510af0-5b21-4bc7-86d9-323cb396ced4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <model-uuid>c91330e5-8e1a-459b-95ee-d682046cbeca</model-uuid>
+ <model-version>3</model-version>
+ <model-name>MowAvpnVmxAvVpe..base_vRE_AV..module-0</model-name>
+ <model-invariant-uuid>f9f41064-cbe7-4e94-ac4c-93d9c54af317</model-invariant-uuid>
+ </vf-module-ecomp-model-information>
+ <orchestration-status>Activated</orchestration-status>
+ <vnf-type>RR</vnf-type>
+ <aic-clli>FRNKGEFF</aic-clli>
+ <prov-status>PROV</prov-status>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <vnf-ecomp-model-information>
+ <model-uuid>07bc0630-11d2-4c08-9c8f-75b036db1f4d</model-uuid>
+ <model-version>3.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE</model-name>
+ <vnf-model-customization-uuid>31d077f6-356f-436e-b447-1997faff4c68
+ </vnf-model-customization-uuid>
+ <model-invariant-uuid>31d077f6-356f-436e-b447-1997faff4c68</model-invariant-uuid>
+ </vnf-ecomp-model-information>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ <tenant>1710vPEPROJECTS297135PROJECT</tenant>
+ <affinity>26VRR_mtrnj151rv2-affinity</affinity>
+ </generic-vnf-service>
+ <oper-status>
+ <order-status>Completed</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1module-0</vnf-type>
+ </vnf-request-information>
+ </service-data>
+ </service-list>
+ </tag0RequestData>
+</response-data>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
new file mode 100644
index 0000000000..50e4347e5f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>1508691</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>1508692</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
new file mode 100644
index 0000000000..f60260d85b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>0000021</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000073</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml
new file mode 100644
index 0000000000..69884c5534
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>svcInstId_test</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactivate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>DeleteVfModuleInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>12345</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vf-module-id>
+ </vf-module-information>
+ <vf-module-request-input/>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml
new file mode 100644
index 0000000000..a03c28c91e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml
@@ -0,0 +1,37 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>cb510af0-5b21-4bc7-86d9-323cb396ce32</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>12345</service-id>
+ <service-type>12345</service-type>
+ <service-instance-id>12345</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>PCRF::module-0-2</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml
new file mode 100644
index 0000000000..abb30b3c2c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml
@@ -0,0 +1,14 @@
+<deleteVfModuleRequest>
+ <cloudSiteId>null</cloudSiteId>
+ <tenantId>null</tenantId>
+ <vnfId>skask</vnfId>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vfModuleStackId>null</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>12345-1513795852327</messageId>
+ <notificationUrl>http://localhost:18080/mso/WorkflowMessage/VNFAResponse/null-1513795852327</notificationUrl>
+</deleteVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
new file mode 100644
index 0000000000..38e8662787
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure>false</backout-on-failure>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..62d1aba771
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure>true</backout-on-failure>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
new file mode 100644
index 0000000000..aea1a46017
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rollbackVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupRolledback>true</volumeGroupRolledback>
+</rollbackVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..6cc84c79b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,104 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL103W-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "callbackUrl": "{do we support this???}"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "backoutOnFailure": true,
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {
+ "name": "vnfName",
+ "value": "STMTN5MMSC20"
+ },
+ {
+ "name": "vnfName2",
+ "value": "US1117MTSNJVBR0246"
+ },
+ {
+ "name": "vnfNmInformation",
+ "value": ""
+ },
+ {
+ "name": "vnfType",
+ "value": "pcrf-capacity"
+ },
+ {
+ "name": "vnfId",
+ "value": "skask"
+ },
+ {
+ "name": "vnfStackId",
+ "value": "slowburn"
+ },
+ {
+ "name": "vnfStatus",
+ "value": "created"
+ },
+ {
+ "name": "aicCloudRegion",
+ "value": "MDTWNJ21"
+ },
+ {
+ "name": "availabilityZone",
+ "value": "slcp3-esx-az01"
+ },
+ {
+ "name": "oamNetworkName",
+ "value": "VLAN-OAM-1323"
+ },
+ {
+ "name": "vmName",
+ "value": "slcp34246vbc246ceb"
+ },
+ {
+ "name": "ipagNetworkId",
+ "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0"
+ },
+ {
+ "name": "vpeNetworkId",
+ "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6"
+ }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..02b43ff186
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5e8913f335
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml
new file mode 100644
index 0000000000..fd6c228cba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml
@@ -0,0 +1,13 @@
+<deleteVolumeGroupRequest>
+ <cloudSiteId>null</cloudSiteId>
+ <tenantId>12345</tenantId>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>null</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>12345</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>580b5601-9260-4d19-abed-e671ac42c429</messageId>
+ <notificationUrl>http://localhost:18080/mso/WorkflowMessage/VNFAResponse/580b5601-9260-4d19-abed-e671ac42c429</notificationUrl>
+</deleteVolumeGroupRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml
new file mode 100644
index 0000000000..b8c2cfdad0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>1508691</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>1508692</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml
new file mode 100644
index 0000000000..9829fd2dbf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:ns5="http://org.onap/so/request/types/v1" xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>12345</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>release</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapterCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>12345</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>VID</source>
+ <notification-url />
+ <order-number />
+ <order-version />
+ </request-information>
+ <service-information>
+ <service-id>12345</service-id>
+ <service-type>12345</service-type>
+ <service-instance-id>123456789</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>12345</vnf-id>
+ <vnf-type>null</vnf-type>
+ <vnf-name>vfModuleName_test</vnf-name>
+ <generic-vnf-id>12345</generic-vnf-id>
+ <generic-vnf-name />
+ <generic-vnf-type />
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml
new file mode 100644
index 0000000000..6fa8bfedc9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>12345</service-type>
+ <service-instance-id>skask</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>abc</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <use-preload>Y</use-preload>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml
new file mode 100644
index 0000000000..c57dec4d86
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>12345</service-type>
+ <service-instance-id>skask</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>abc</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <use-preload>Y</use-preload>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml
new file mode 100644
index 0000000000..20b5462729
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml
@@ -0,0 +1,195 @@
+<response-data>
+ <tag0CallbackHeader>
+ <tag0RequestId>2681784d-118e-4485-929f-2ae3212f5c07-1507707098467</tag0RequestId>
+ <tag0ResponseCode>200</tag0ResponseCode>
+ <tag0ResponseMessage>OK</tag0ResponseMessage>
+ </tag0CallbackHeader>
+ <tag0RequestData>
+ <service-list>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ <service-status>
+ <response-code>200</response-code>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2017-09-19T143942.327Z</response-timestamp>
+ <final-indicator>Y</final-indicator>
+ <rpc-name>activate-vnf-request</rpc-name>
+ </service-status>
+ <service-data>
+ <service-information>
+ <service-type>vRRaaS</service-type>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ </service-information>
+ <request-information>
+ <request-id>ae322537-d081-4a01-95a5-c1448116d0c5</request-id>
+ </request-information>
+ <ipsec-tunnel-parameters/>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <availability-zones>
+ <availability-zone>frkde-esx-az01</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>vrra</vm-type>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network1</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT1</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT1</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network2</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT2</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT2</network-id>
+ </vm-networks>
+ <vm-names>
+ <vm-name>frkdevRvrra24</vm-name>
+ <vm-uuid>b05a42c3-28ea-4d18-8653-6515125acc1a</vm-uuid>
+ </vm-names>
+ </vnf-vms>
+ <vnf-status>Activated</vnf-status>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ </vnf-assignments>
+ </vnf-topology-information>
+ <generic-vnf-service>
+ <cloud-region-id>FRN1</cloud-region-id>
+ <outer-vlan-tag>4027</outer-vlan-tag>
+ <cloud-owner>att-aic</cloud-owner>
+ <service-ecomp-model-information>
+ <model-uuid>b73c6911-be64-448a-bb4b-7b7a7006507a</model-uuid>
+ <model-version>5.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE Service</model-name>
+ <model-invariant-uuid>d48764b1-043d-4783-89e3-8817602dc833</model-invariant-uuid>
+ </service-ecomp-model-information>
+ <as-number>65001</as-number>
+ <infra-service-instance-id>wl3900-1712-46db-99be-de9eb963a6cf26</infra-service-instance-id>
+ <country-code>DE</country-code>
+ <vnf-id>vnfID-1712_26</vnf-id>
+ <vnf-host-name>26VRR_mtrnj151rv2</vnf-host-name>
+ <vf-module-ecomp-model-information>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>778c2ed5-77a8-426e-94fe-51a4d40199c4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>cb510af0-5b21-4bc7-86d9-323cb396ced4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <model-uuid>c91330e5-8e1a-459b-95ee-d682046cbeca</model-uuid>
+ <model-version>3</model-version>
+ <model-name>MowAvpnVmxAvVpe..base_vRE_AV..module-0</model-name>
+ <model-invariant-uuid>f9f41064-cbe7-4e94-ac4c-93d9c54af317</model-invariant-uuid>
+ </vf-module-ecomp-model-information>
+ <orchestration-status>Activated</orchestration-status>
+ <vnf-type>RR</vnf-type>
+ <aic-clli>FRNKGEFF</aic-clli>
+ <prov-status>PROV</prov-status>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <vnf-ecomp-model-information>
+ <model-uuid>07bc0630-11d2-4c08-9c8f-75b036db1f4d</model-uuid>
+ <model-version>3.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE</model-name>
+ <vnf-model-customization-uuid>31d077f6-356f-436e-b447-1997faff4c68
+ </vnf-model-customization-uuid>
+ <model-invariant-uuid>31d077f6-356f-436e-b447-1997faff4c68</model-invariant-uuid>
+ </vnf-ecomp-model-information>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ <tenant>1710vPEPROJECTS297135PROJECT</tenant>
+ <affinity>26VRR_mtrnj151rv2-affinity</affinity>
+ </generic-vnf-service>
+ <oper-status>
+ <order-status>Completed</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1module-0</vnf-type>
+ </vnf-request-information>
+ </service-data>
+ </service-list>
+ </tag0RequestData>
+</response-data>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml
new file mode 100644
index 0000000000..79ab33d45c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml
@@ -0,0 +1,11 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/12345</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml
new file mode 100644
index 0000000000..d9268872b3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml
@@ -0,0 +1,170 @@
+<updateVfModuleRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <vnfId>skask</vnfId>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vfModuleStackId>abc</vfModuleStackId>
+ <vnfType>vRRaas</vnfType>
+ <vnfVersion>1.0</vnfVersion>
+ <modelCustomizationUuid>cb510af0-5b21-4bc7-86d9-323cb396ced3</modelCustomizationUuid>
+ <vfModuleType>PCRF::module-0-2</vfModuleType>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>12345</volumeGroupStackId>
+ <baseVfModuleId>12345</baseVfModuleId>
+ <baseVfModuleStackId>12345</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>12345</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ <entry>
+ <key>vf_module_id</key>
+ <value>cb510af0-5b21-4bc7-86d9-323cb396ce32</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>skask-test</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>workload_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>PCRF::module-0-2</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>skask</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrr_flavor_name</key>
+ <value>ns.c16r32d128.v1</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_name</key>
+ <value>ADIG_SRIOV_2</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>environment_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_name</key>
+ <value>ADIGOAM.OAM</value>
+ </entry>
+ <entry>
+ <key>vrra_name_0</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_name</key>
+ <value>ADIG_SRIOV_1</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrr_image_name</key>
+ <value>MDT17</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_names</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>availability_zone_0</key>
+ <value>nova</value>
+ </entry>
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>MIS/1604/0026/SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <messageId>testRequestId-1503410089303-1513287018300</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMesssage/VNFAResponse/testRequestId-1503410089303-1513287018300</notificationUrl>
+</updateVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml
new file mode 100644
index 0000000000..d5175f4dc9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml
@@ -0,0 +1,11 @@
+<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>null</request-id>
+ <action>DELETE</action>
+ <source>null</source>
+ </request-info>
+ <aetgt:status-message>E2E Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DeleteCustomE2EServiceInstance</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml
new file mode 100644
index 0000000000..e380ce7ed2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ <output xmlns="com:att:sdnctl:nbncapi">
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>SK-2016-10-22-001</svc-request-id>
+ <nbnc-response-information>
+ <response-info>
+ <result>SUCCESS</result>
+ <aai-status>ERROR</aai-status>
+ </response-info>
+ <virtual-datacenter-list>
+ <vdc-id>15001417</vdc-id>
+ <router-list>
+ <router-name>ALPRTR2</router-name>
+ <ipe-loopback-address>1.1.1.2</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPVDBE1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPASBG1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>ALPBGF2</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>ALPBGF1</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>2</ipe-id>
+ </router-list>
+ <router-list>
+ <router-name>ALPRTR1</router-name>
+ <ipe-loopback-address>1.1.1.1</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPVDBE1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPASBG1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>ALPBGF2</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>ALPBGF1</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>1</ipe-id>
+ </router-list>
+ </virtual-datacenter-list>
+ <virtual-datacenter-list>
+ <vdc-id>15001418</vdc-id>
+ <router-list>
+ <router-name>SANRTR1</router-name>
+ <ipe-loopback-address>2.1.1.1</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANVDBE1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANASBG1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>SANBGF2</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>SANBGF1</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>1</ipe-id>
+ </router-list>
+ <router-list>
+ <router-name>SANRTR2</router-name>
+ <ipe-loopback-address>2.1.1.2</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANVDBE1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANASBG1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>SANBGF2</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>SANBGF1</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>2</ipe-id>
+ </router-list>
+ </virtual-datacenter-list>
+ <service-type>COLLABORATE</service-type>
+ <interface-status>DISABLE</interface-status>
+ <customer-id>custid-888</customer-id>
+ <service-instance-id>SII-2016-10-22-001</service-instance-id>
+ <provision-type>CUSTOMER</provision-type>
+ <vni-id>100668</vni-id>
+ </nbnc-response-information>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml
new file mode 100644
index 0000000000..c367b5c959
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml
@@ -0,0 +1,33 @@
+<service-instance xmlns="http://org.openecomp.aai.inventory/v11">
+ <service-instance-id>1234</service-instance-id>
+ <service-instance-name>volte-service</service-instance-name>
+ <service-type>testservicetype</service-type>
+ <service-role>testservicerole</service-role>
+ <description>volte service</description>
+ <model-invariant-id>c1d4305f-cdbd-4bbe-9069-a2f4978fd89e</model-invariant-id>
+ <model-version-id>d4df5c27-98a1-4812-a8aa-c17f055b7a3f</model-version-id>
+ <resource-version>1508838121849</resource-version>
+ <orchestration-status>create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/test_customer/service-subscription/example-service-type/service-instance/1234_1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>test_customer</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>test_customer</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>1234_1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>volte-service_vEPC</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</service-instance> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml
new file mode 100644
index 0000000000..e178583a34
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</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/allotted-resources/allotted-resource/arId-1</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
new file mode 100644
index 0000000000..a472996121
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
@@ -0,0 +1,23 @@
+<generic-vnfs xmlns="http://org.openecomp.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/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://org.openecomp.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/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://org.openecomp.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/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml
new file mode 100644
index 0000000000..f66c9c4fb8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml
@@ -0,0 +1,2 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml
new file mode 100644
index 0000000000..c29133e539
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.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%252F0027%252FSW_INTERNET</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml
new file mode 100644
index 0000000000..bc810c6014
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml
@@ -0,0 +1,30 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0027/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>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml
new file mode 100644
index 0000000000..e52b26ac00
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml
@@ -0,0 +1,6 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list/>
+ <metadata/>
+</service-instance> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml
new file mode 100644
index 0000000000..416689e10c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://org.openecomp.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/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml
new file mode 100644
index 0000000000..28c739a0af
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search-results xmlns="http://org.openecomp.aai.inventory/v8">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/aa8428ac-7dd2-441f-aa3e-e175802574fb</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml
new file mode 100644
index 0000000000..e377c70474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml
@@ -0,0 +1,30 @@
+<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/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json
new file mode 100644
index 0000000000..04040028c3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json
@@ -0,0 +1,39 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "skask",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration- parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
new file mode 100644
index 0000000000..c1491d128b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
@@ -0,0 +1,46 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1",
+ "modelCustomizationUuid": "customizationId123"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "testVnfName123",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{serviceInstanceId}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ },
+ "platform": {
+ "platformName": "platform name"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "line of business names"
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json
new file mode 100644
index 0000000000..661a89ec99
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json
@@ -0,0 +1,21 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "callbackUrl": "http://localhost:28080/simulada/CCD/AsyncRequestStatus",
+ "source": "CCD",
+ "instanceName": "USOSTCDALTX0101VFHN31"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "38829939920000",
+ "subscriberName": "Fern Hill Real Estate LLC 31"
+ },
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
new file mode 100644
index 0000000000..e8d9fc29b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "testVnfName123",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{serviceInstanceId}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "cascadeDelete": true
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json
new file mode 100644
index 0000000000..640e16b634
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json
@@ -0,0 +1,186 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSOTADevInfra_vSAMP10a_Service",
+ "modelUuid" : "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersion" : "1.0"
+ },
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "serviceVnfs": [
+
+ { "modelInfo" : {
+ "modelName" : "vSAMP10a",
+ "modelUuid" : "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "68dc9a92-214c-11e7-93ae-92361f002671",
+ "modelInstanceName" : "vSAMP10a 1"
+ },
+ "toscaNodeType" : "VF",
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest4",
+ "modelUuid" : "025606c1-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba01a",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba01a"
+ }, "isBase" : true,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest3",
+ "modelUuid" : "02560575-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba0bb",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba0bb"
+ }, "isBase" : true,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest5",
+ "modelUuid" : "025607e4-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d14cba01a",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d14cba01a"
+ }, "isBase" : false,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::PCM::module-2",
+ "modelUuid" : "7774b4e4-7d37-11e7-bb31-be2e44b06b34",
+ "modelInvariantUuid" : "93e9c1d2-7d37-11e7-bb31-be2e44b06b34",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "6728bee8-7d3a-11e7-bb31-be2e44b06b34"
+ }, "isBase" : false,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::PCM::module-1",
+ "modelUuid" : "066de97e-253e-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "64efd51a-2544-11e7-93ae-92361f002671",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "b4ea86b4-253f-11e7-93ae-92361f002671"
+ }, "isBase" : false,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::base::module-0",
+ "modelUuid" : "20c4431c-246d-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "cb82ffd8-252a-11e7-93ae-92361f002671"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10a::base::module-0",
+ "modelUuid" : "02560de2-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "MIGRATED_36e76920-ef30-4793-9979-cbd7d4b2bfc4"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "base::module-0",
+ "modelUuid" : "02561381-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "MIGRATED_51baae4c-b7c7-4f57-b77e-6e01acca89e5"
+ }, "isBase" : true,
+ "vfModuleLabel" : "module-0",
+ "initialCount" : 1,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10a::PCM::module-1",
+ "modelUuid" : "02560f1b-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "MIGRATED_e9be2ed7-45b6-479c-b06e-9093899f8ce8"
+ }, "isBase" : true,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "Tunnel_Xconn",
+ "modelUuid" : "f6b7d4c6-e8a4-46e2-81bc-31cad5072842",
+ "modelInvariantUuid" : "b7a1b78e-6b6b-4b36-9698-8c9530da14af",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "5b9bee43-f537-4fb3-9e8b-4de9f714d28a",
+ "modelInstanceName" : "Pri_Tunnel_Xconn 9"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : null,
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ],
+ "serviceConfigs": [
+ {
+ "modelInfo" : {
+ "modelName" : "Mulder",
+ "modelUuid" : "025606c1-4fff-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "025606c1-4eee-11e7-9252-005056850d2e",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "025606c1-4ddd-11e7-9252-005056850d2e",
+ "modelInstanceName" : "X_FILES_001"
+ },
+ "toscaNodeType" : "Scully"
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Krychuk",
+ "modelUuid" : "025606c1-5fff-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "025606c1-5eee-11e7-9252-005056850d2e",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "025606c1-5ddd-11e7-9252-005056850d2e",
+ "modelInstanceName" : "X_FILES_002"
+ },
+ "toscaNodeType" : "Skinner"
+ }
+ ]
+ }}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json
new file mode 100644
index 0000000000..dd3ff6841e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json
@@ -0,0 +1,38 @@
+{
+ "service":
+ {
+ "serviceType":"example-service-type",
+ "globalSubscriberId":"test_custormer",
+ "resources":
+ [
+ {
+ "resourceInstanceId":"ns111",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":
+ {
+ "scaleNsByStepsData":
+ {
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ },
+ {
+ "resourceInstanceId":"ns333",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":
+ {
+ "scaleNsByStepsData":
+ {
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ }
+ ],
+ "serviceInstanceName":"service1"
+ },
+ "operationId":"15c01683-4f15-45e7-b213-dcbfe6f42a1b"
+ } \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json
new file mode 100644
index 0000000000..7c9717244b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json
@@ -0,0 +1,49 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"usePreload": false,
+"userParams" : [
+ {
+ "name" : "someUserParam",
+ "value" : "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+]
+}
+}
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
new file mode 100644
index 0000000000..9564f705ae
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
@@ -0,0 +1,62 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "introvert",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "MODEL12345"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0",
+ "instanceId": "supercool",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json
new file mode 100644
index 0000000000..5ce8546a41
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json
@@ -0,0 +1,56 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "skask",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"usePreload": false,
+"userParams" : [
+ {
+ "name" : "someUserParam",
+ "value" : "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ },
+ {
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+]
+}
+}
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
new file mode 100644
index 0000000000..eb2d9faa2a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
@@ -0,0 +1,16 @@
+{
+"requestDetails": {
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"source": "VID",
+"requestorId": "xxxxxx"
+},
+"requestParameters": {
+"payload":
+"{\"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/src/test/resources/__files/Macro/CreateNetworkCollection.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json
new file mode 100644
index 0000000000..7b369ab97e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json
@@ -0,0 +1,70 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "networks": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf970"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ }
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf970"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json
new file mode 100644
index 0000000000..51caddd48a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json
@@ -0,0 +1,125 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersion": "10.0"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+ "modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+ "modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "test"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+ "modelVersionId": "4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vPFE_BV..module-2",
+ "modelVersionId": "f555558f-d538-4876-8ffa-b102650fad64",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json
new file mode 100644
index 0000000000..c315b1ed1d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json
@@ -0,0 +1 @@
+{"decision":"PERMIT","details":"Abort"} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json
new file mode 100644
index 0000000000..7cbdebb6b3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json
@@ -0,0 +1 @@
+{"decision":"PERMIT","details":"Skip"} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json
new file mode 100644
index 0000000000..5a6460b62d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json
@@ -0,0 +1,7 @@
+{
+ "ActivateServiceInstance": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json
new file mode 100644
index 0000000000..57ab9c2799
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json
@@ -0,0 +1,13 @@
+{
+ "ActivateVnf": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ },
+ "genericVnf": {
+ "@class": "inventory.aai.onap.org.v12.GenericVnf"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json
new file mode 100644
index 0000000000..7c35761461
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json
@@ -0,0 +1,16 @@
+{
+ "AssignServiceInstance": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "project": {
+ "@class": "inventory.aai.onap.org.v12.Project"
+ },
+ "owningEntity": {
+ "@class": "inventory.aai.onap.org.v12.OwningEntity"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json
new file mode 100644
index 0000000000..7fff5ca3ce
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json
@@ -0,0 +1,13 @@
+{
+ "AssignVnf": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ },
+ "genericVnf": {
+ "@class": "inventory.aai.onap.org.v12.GenericVnf"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..836b3c8055
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</createNetworkError>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
new file mode 100644
index 0000000000..02996a13ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
@@ -0,0 +1,80 @@
+<html>
+ <head>
+ <title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report
+ </title>
+ <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
+ H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
+ B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
+ P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
+ {color : black;}A.name {color : black;}HR {color : #525D76;} -->
+ </style>
+ </head>
+ <body>
+ <h1>JBWEB000065: HTTP Status 500 - java.lang.NullPointerException</h1>
+ <HR size="1" noshade="noshade" />
+ <p>
+ <b>JBWEB000309: type</b>
+ JBWEB000066: Exception report
+ </p>
+ <p>
+ <b>JBWEB000068: message</b>
+ <u>java.lang.NullPointerException</u>
+ </p>
+ <p>
+ <b>JBWEB000069: description</b>
+ <u>JBWEB000145: The server encountered an internal error that
+ prevented it from fulfilling this request.
+ </u>
+ </p>
+ <p>
+ <b>JBWEB000070: exception</b>
+ <pre>org.jboss.resteasy.spi.UnhandledException:
+ java.lang.NullPointerException
+ org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.onap.so.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.onap.so.adapters.network.NetworkAdapterRest.createNetwork(NetworkAdapterRest.java:64)
+ sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ java.lang.reflect.Method.invoke(Method.java:606)
+ org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
+ org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000072: note</b>
+ <u>JBWEB000073: The full stack trace of the root cause is available
+ in the JBoss Web/7.2.2.Final-redhat-1 logs.
+ </u>
+ </p>
+ <HR size="1" noshade="noshade" />
+ <h3>JBoss Web/7.2.2.Final-redhat-1</h3>
+ </body>
+</html> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
new file mode 100644
index 0000000000..0faec794b0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:updateNetworkContrailResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..ca5145c226
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
@@ -0,0 +1,4 @@
+<result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
+</result-data> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..e06d27ea88
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..24ee1df9c8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml
@@ -0,0 +1,95 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <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:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..79cc14ada3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>13979:105757</heat-stack-id>
+ <resource-version>13979:105757</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..db134a1127
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..34b4a036c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c01d0a4f61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml
@@ -0,0 +1,57 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <route-targets>
+ <route-target>
+ <global-route-target>13979:105708</global-route-target>
+ <route-target-role>EXPORT</route-target-role>
+ <resource-version>1504025599510</resource-version>
+ </route-target>
+ <route-target>
+ <global-route-target>13979:105707</global-route-target>
+ <route-target-role>IMPORT</route-target-role>
+ <resource-version>1504025599519</resource-version>
+ </route-target>
+ </route-targets>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5f1c2cafa5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml
@@ -0,0 +1,46 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<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/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..03d63f9f05
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/vf-modules/vf-module/6a1dc898-b590-47b9-bbf0-34424a7a2ec3/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</volume-group>
+ \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..603c1f452f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
new file mode 100644
index 0000000000..f32ba2994b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff-x",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml
new file mode 100644
index 0000000000..8f8d150970
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml
@@ -0,0 +1,38 @@
+<updateVolumeGroupRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId/>
+ <vnfId>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnfId>
+ <vnfName>testVnfName123</vnfName>
+ <volumeGroupId>null</volumeGroupId>
+ <volumeGroupName>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volumeGroupName>
+ <volumeGroupStackId/>
+ <vnfType>vnf1</vnfType>
+ <vnfVersion>1</vnfVersion>
+ <vfModuleType/>
+ <modelCustomizationUuid/>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>2f1cc940-455f-4ee2-9411-a7899cd4f124</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>testVnfName123</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>MSOTESTVOL102a-vSAMP12_base_vol_module-0</value>
+ </entry>
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>12345</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>12345-1513275871414</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/12345-1513275871414</notificationUrl>
+</updateVolumeGroupRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
new file mode 100644
index 0000000000..4087ab8f5f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
@@ -0,0 +1,29 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v8">
+ <vf-module-id>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</vf-module-id>
+ <vf-module-name>MSOST10606-vSAMP12_MTN6_base_module-0</vf-module-name>
+ <heat-stack-id>MSOST10606-vSAMP12_MTN6_base_module-0/81b01583-690c-4ec3-9c58-0eafa7a90be7</heat-stack-id>
+ <orchestration-status>active</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <resource-version>1475077639</resource-version>
+ <model-invariant-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <relationship-list>
+ <relationship>
+ <related-to>volume-group</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/volume-groups/volume-group/064bd1c6-e377-4009-a744-e958eec6e727/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>volume-group.volume-group-id</relationship-key>
+ <relationship-value>064bd1c6-e377-4009-a744-e958eec6e727</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml
new file mode 100644
index 0000000000..2be546162f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml
@@ -0,0 +1,37 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<brg-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>BRGmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <brg-assignments>
+ <fq-name>fq-name</fq-name>
+ <dest-network>
+ <network-id>d1</network-id>
+ <network-role>drole</network-role>
+ </dest-network>
+ <vlan-tag>vlan-tag</vlan-tag>
+ <source-network>
+ <network-id>s2</network-id>
+ <network-role>srole</network-role>
+ </source-network>
+ <txc-id>txc-id</txc-id>
+ <txc-applied-service>
+ <service-instance-id>1</service-instance-id>
+ <vnf-id>123</vnf-id>
+ <txc-fqdn>a.b.c.d</txc-fqdn>
+ </txc-applied-service>
+ </brg-assignments>
+</brg-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
new file mode 100644
index 0000000000..c2d197a2d8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
@@ -0,0 +1,24 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<tunnelxconn-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>TXCmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <tunnelxconn-assignments>
+ <vni>my-vni</vni>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
+ </tunnelxconn-assignments>
+</tunnelxconn-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json
new file mode 100644
index 0000000000..81fdcc76d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json
@@ -0,0 +1,127 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "6ea0b528-e303-4686-aa77-aa2fcbdccb96",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "f5696ec0-ec71-4916-bf3b-93a654efcba4",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "TunnelXConn",
+ "allottedResourceRole" : "TunnelXConn",
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "homingSolution": {
+ "inventoryType": "service",
+ "serviceInstanceId": "MIS%252F1604%252F0027%252FSW_INTERNET",
+ "vnfHostname": "MDTNJ01",
+ "cloudOwner": "aic",
+ "cloudRegionId": "dfwtx",
+ "aicClli": "KDTNJ01",
+ "aicVersion": "3.0",
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ]
+ }
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "BRG",
+ "allottedResourceRole" : "BRG",
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "homingSolution": {
+ "inventoryType": "service",
+ "serviceInstanceId": "MIS%252F1604%252F0027%252FSW_INTERNET",
+ "vnfHostname": "MDTNJ01",
+ "cloudOwner": "aic",
+ "cloudRegionId": "dfwtx",
+ "aicClli": "KDTNJ01",
+ "aicVersion": "3.0",
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ]
+ }
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json
new file mode 100644
index 0000000000..80692b27f5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json
@@ -0,0 +1,11 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [],
+ "serviceNetworks": [],
+ "serviceAllottedResources": []
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml
new file mode 100644
index 0000000000..b9d88d15db
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml
@@ -0,0 +1,7 @@
+<customer xmlns="http://org.openecomp.aai.inventory/v8">
+ <global-customer-id>SDN-ETHERNET-INTERNET</global-customer-id>
+ <subscriber-name>SDN-ETHERNET-INTERNET</subscriber-name>
+ <resource-version>1490627351232</resource-version>
+ <service-subscriptions/>
+ <relationship-list/>
+</customer>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
new file mode 100644
index 0000000000..dc4669e8d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
@@ -0,0 +1,40 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "instanceName":"VCPE1",
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
new file mode 100644
index 0000000000..dc9ac49a4e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
new file mode 100644
index 0000000000..d5b0713d9f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "source":"VID",
+ "suppressRollback":"true",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml
new file mode 100644
index 0000000000..3cb31464d5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-brgB</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml
new file mode 100644
index 0000000000..65cee9f662
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-txcA</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml
new file mode 100644
index 0000000000..932dbfb2ca
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</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/allotted-resources/allotted-resource/ar-brgB</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml
new file mode 100644
index 0000000000..e0511873b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml
@@ -0,0 +1,35 @@
+<service-instance>
+
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfX</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfY</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netB</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netC</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-txcA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-brgB</related-link>
+ </relationship>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml
new file mode 100644
index 0000000000..feb535c238
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml
@@ -0,0 +1,8 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ <resource-version>123456789</resource-version>
+
+ <relationship-list>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml
new file mode 100644
index 0000000000..1c4f13d642
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</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/allotted-resources/allotted-resource/ar-txcA</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json
new file mode 100644
index 0000000000..dc4669e8d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json
@@ -0,0 +1,40 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "instanceName":"VCPE1",
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml
new file mode 100644
index 0000000000..8b8863e29c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml
@@ -0,0 +1,36 @@
+<service xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfX</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfY/</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netB</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netC</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/anytxc</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/anybrg</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/other</related-link>
+ </relationship>
+ </relationship-list>
+</service>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..2be546162f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,37 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<brg-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>BRGmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <brg-assignments>
+ <fq-name>fq-name</fq-name>
+ <dest-network>
+ <network-id>d1</network-id>
+ <network-role>drole</network-role>
+ </dest-network>
+ <vlan-tag>vlan-tag</vlan-tag>
+ <source-network>
+ <network-id>s2</network-id>
+ <network-role>srole</network-role>
+ </source-network>
+ <txc-id>txc-id</txc-id>
+ <txc-applied-service>
+ <service-instance-id>1</service-instance-id>
+ <vnf-id>123</vnf-id>
+ <txc-fqdn>a.b.c.d</txc-fqdn>
+ </txc-applied-service>
+ </brg-assignments>
+</brg-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml
new file mode 100644
index 0000000000..e352ff8f1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml
@@ -0,0 +1,8 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-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/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml
new file mode 100644
index 0000000000..8c3976b828
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRGr</role>
+ <type>BRGt</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml
new file mode 100644
index 0000000000..650d608fb0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>txc</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml
new file mode 100644
index 0000000000..14c7410995
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml
@@ -0,0 +1,38 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+
+ <orchestration-status>Active</orchestration-status>
+
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-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/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+
+ <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>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml
new file mode 100644
index 0000000000..8ed991608a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml
new file mode 100644
index 0000000000..713c5e7ad5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d1</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactvate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml
new file mode 100644
index 0000000000..df61910355
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d3</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml
new file mode 100644
index 0000000000..35c783539c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d2</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..c2d197a2d8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,24 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<tunnelxconn-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>TXCmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <tunnelxconn-assignments>
+ <vni>my-vni</vni>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
+ </tunnelxconn-assignments>
+</tunnelxconn-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml
new file mode 100644
index 0000000000..e352ff8f1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml
@@ -0,0 +1,8 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-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/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml
new file mode 100644
index 0000000000..dfb7d46a68
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TXCr</role>
+ <type>TXCt</type>
+ <description>TXC</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml
new file mode 100644
index 0000000000..59c503036a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>brg</role>
+ <type>TXC</type>
+ <description>TXC</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml
new file mode 100644
index 0000000000..14c7410995
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml
@@ -0,0 +1,38 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+
+ <orchestration-status>Active</orchestration-status>
+
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-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/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+
+ <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>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml
new file mode 100644
index 0000000000..35630b79a8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d1</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactvate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml
new file mode 100644
index 0000000000..f6c9cc4626
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d3</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml
new file mode 100644
index 0000000000..2a5597ca77
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d2</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml
new file mode 100644
index 0000000000..8ed991608a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json
new file mode 100644
index 0000000000..d05fccf98a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json
@@ -0,0 +1,94 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "6ea0b528-e303-4686-aa77-aa2fcbdccb96",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "f5696ec0-ec71-4916-bf3b-93a654efcba4",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json
new file mode 100644
index 0000000000..b6e8a94888
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json
@@ -0,0 +1,98 @@
+{ "serviceResources" : {
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "MODEL-ID-1234",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json
new file mode 100644
index 0000000000..e1d3118537
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json
@@ -0,0 +1,110 @@
+{ "serviceResources" : {
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json
new file mode 100644
index 0000000000..c7938d1af6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json
new file mode 100644
index 0000000000..3067d124c3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "MODEL-123",
+ "modelInstanceName" : "VNF for VF Module Create Test Two Phased"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "STMTN5MMSC21-MMSC::model-1-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json
new file mode 100644
index 0000000000..a9b3226483
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "MODEL-123",
+ "modelInstanceName" : "VNF for VF Module Create Test Two Phased"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : "true",
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "STMTN5MMSC21-MMSC::model-1-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json
new file mode 100644
index 0000000000..bc54c557e1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json
@@ -0,0 +1,110 @@
+{
+"serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "CMW_Service",
+ "modelUuid" : "",
+ "modelInvariantId" : "cmw-123-456-789",
+ "modelVersion" : "",
+ "modelCustomizationUuid" : "",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "Cmw_123",
+ "modelType" : ""
+ },
+ "serviceInstanceData" : {
+ "instanceId" : "ff5256d2-5a33-55df-13ab-12abad84e7ff"
+ },
+ "serviceNetworks" : [ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL30_BASIC",
+ "modelUuid" : "",
+ "modelInvariantId" : "not yet implemented",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "z_network_123",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "mod-inst-uuid-123",
+ "modelType" : "network"
+ },
+ "instanceData" : { },
+ "networkType" : "CONTRAIL30_BASIC"
+ } ],
+ "serviceVnfs" : [ {
+ "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "",
+ "modelInvariantId" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelType" : "vnf"
+ },
+ "instanceData" : { },
+ "vfModules" : [ {
+ "modelInfo" : {
+ "modelName" : "vSAMP12::base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1001",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1001",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 1
+ }, {
+ "modelInfo" : {
+ "modelName" : "base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1002",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1002",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 1
+ }, {
+ "modelInfo" : {
+ "modelName" : "vSAMP12DEV::base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1003",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "f86e8800-7629-427f-b284-3dbfd04db01f",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 0
+ } ]
+ } ],
+ "serviceAllottedResources" : [ {
+ "modelInfo" : {
+ "modelName" : "Bruce Wayne",
+ "modelUuid" : "",
+ "modelInvariantId" : "not yet implemented",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "ar-mod-custid-456-456",
+ "modelInstanceName" : "Clark Kent",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "123-123",
+ "modelType" : "allottedResource"
+ },
+ "instanceData" : { }
+ } ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..0688ea51e4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>fqdn123</network-policy-fqdn>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <resource-version>145878989</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0ae5b79484
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap.so/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
new file mode 100644
index 0000000000..5232e530e9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
@@ -0,0 +1,29 @@
+<vnf-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>DEV-VF-0011</request-id>
+ <action>UPDATE_VF_MODULE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <vnf-inputs>
+ <vnf-id>skask</vnf-id> <!-- Required -->
+ <vf-module-id>supercool</vf-module-id> <!-- Required -->
+ <vnf-type>pcrf-capacity</vnf-type> <!-- Optional -->
+ <vf-module-model-name>PCRF::module-0</vf-module-model-name> <!-- Required -->
+ <asdc-service-model-version></asdc-service-model-version> <!-- Optional -->
+ <service-id>serviceIdUUID</service-id> <!-- Required -->
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region> <!-- Required -->
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id> <!-- Required -->
+ <volume-group-id>78987</volume-group-id> <!-- Optional -->
+ <persona-model-id>introvert</persona-model-id> <!-- Optional -->
+ <persona-model-version>3.14</persona-model-version> <!-- Optional -->
+ <contrail-service-instance-fqdn>myhost.appl.edu</contrail-service-instance-fqdn> <!-- Optional -->
+ <vnf-persona-model-id>introvert</vnf-persona-model-id> <!-- Optional -->
+ <vnf-persona-model-version>3.14</vnf-persona-model-version> <!-- Optional -->
+ </vnf-inputs>
+ <vnf-params>
+ <param name="oam_network_name">VLAN-OAM-1323</param>
+ <param name="vm_name">slcp34246vbc246ceb</param>
+ <param name="ipag_network">970cd2b9-7f09-4a12-af47-182ea38ba1f0</param>
+ <param name="vpe_network">545cc2c3-1930-4100-b534-5d82d0e12bb6</param>
+ </vnf-params>
+</vnf-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1c736453bc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml
@@ -0,0 +1,51 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>12345678-f41f-4822-9323-b75962763d74</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <module-index>2</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <module-index>0</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <module-index>1</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml
new file mode 100644
index 0000000000..ed96028908
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>skask</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..f3009e0f4c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>195159195</heat-stack-id>
+ <resource-version>14567890</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml
new file mode 100644
index 0000000000..d476b728bd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml
@@ -0,0 +1,11 @@
+<output
+ xmlns="org:onap:sdnc:northbound:generic-resource">
+ <svc-request-id>094d311c-40bc-4ff1-9617-37c4226efcc3</svc-request-id>
+ <response-code>200</response-code>
+ <response-message></response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-response-information>
+ <instance-id>8462db9b-3e91-4e90-a2c8-6471313f87bf</instance-id>
+ <object-path>restconf/config/GENERIC-RESOURCE-API:services/service/8462db9b-3e91-4e90-a2c8-6471313f87bf/service-data/service-topology/</object-path>
+ </service-response-information>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml
new file mode 100644
index 0000000000..4cab6c6615
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml
@@ -0,0 +1,13 @@
+<output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml
new file mode 100644
index 0000000000..7512435415
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml
new file mode 100644
index 0000000000..7d3d0e54d1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml
@@ -0,0 +1,13 @@
+ <output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ </output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml
new file mode 100644
index 0000000000..e43a1319ca
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml
@@ -0,0 +1,13 @@
+<output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml
new file mode 100644
index 0000000000..d061cda9e0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml
@@ -0,0 +1,8 @@
+<output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>404</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..0ee3f2827d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,315 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vnf-list xmlns="com:att:sdnctl:vnf">
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <service-data>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <sdnc-request-header>
+ <svc-request-id>9ddf628a-9eca-430e-8974-22d520a31be1</svc-request-id>
+ <svc-action>assign</svc-action>
+ <svc-notification-url>https://localhost:8443/adapters/rest/SDNCNotify</svc-notification-url>
+ </sdnc-request-header>
+ <service-information>
+ <subscriber-name>notsurewecare</subscriber-name>
+ <service-instance-id>bd1b3789-6474-4935-94b2-90b656e035d0</service-instance-id>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ </service-information>
+ <oper-status>
+ <order-status>PendingCreate</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1::module-0</vnf-type>
+ </vnf-request-information>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <vnf-networks>
+ <network-role>mog_exn</network-role>
+ <network-id>03dbd833-785c-40c0-bf32-37594b5334bc</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_exn_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>6f82d234-41a4-48e9-a9e8-415667a72929</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_oam</network-role>
+ <network-id>3f181cde-9380-4c20-9d3a-e1a4ee74f994</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_oam_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>713b6770-13fa-4949-8dbb-a1288c5e5932</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-id>821a550a-3f50-4725-995b-f212d5caec7c</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>18926e56-12b6-4a4d-98b6-37e0c05626ee</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-id>3dabf5c0-cffb-420c-8960-8499c74eb25f</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_2</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>35530b29-a4de-48ff-a014-111110ccc652</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_gn</network-role>
+ <network-id>3ce97321-6e7f-49af-bd12-f833e377c310</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_gn_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>32bfdd2c-28e1-4895-87a6-373bf12c3129</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_dmz</network-role>
+ <network-id>d43ca910-02a5-47dc-8510-100a68a3c9e0</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_dmz_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>cb9500fb-943f-412e-aea6-458711564a75</neutron-id>
+ </vnf-networks>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>ps</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS002</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS003</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS004</vm-name>
+ </vm-names>
+ <vm-count>4</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.251</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.252</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>oam</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>2</vm-count>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.252</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>pd</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPD001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPD002</vm-name>
+ </vm-names>
+ <vm-count>2</vm-count>
+ <vm-networks>
+ <network-role>mog_dmz</network-role>
+ <network-ips>
+ <ip-address>107.225.25.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.225.25.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.225.254.253</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.254</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.253</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.239.167.249</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_exn</network-role>
+ <network-ips>
+ <ip-address>107.224.46.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.46.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.46.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.247</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.248</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_gn</network-role>
+ <network-ips>
+ <ip-address>107.224.41.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.41.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-ips>
+ <ip-address>107.224.38.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.38.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>sm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM002</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM003</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM004</vm-name>
+ </vm-names>
+ <vm-count>4</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.243</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.244</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.245</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.246</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ </vnf-assignments>
+ <vnf-topology-identifier>
+ <vnf-name>ZVNNMOGX01_base</vnf-name>
+ <service-type>SDN-MOBILITY</service-type>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1::module-0</vnf-type>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ </vnf-topology-identifier>
+ </vnf-topology-information>
+ <request-information>
+ <request-id>9ddf628a-9eca-430e-8974-22d520a31be1</request-id>
+ <notification-url/>
+ <source>PORTAL</source>
+ <request-action>VNFActivateRequest</request-action>
+ </request-information>
+ </service-data>
+ <service-status>
+ <response-code>200</response-code>
+ <final-indicator>Y</final-indicator>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2016-08-05T16:15:19.398Z</response-timestamp>
+ <rpc-name>vnf-topology-operation</rpc-name>
+ <vnfsdn-action>VNFActivateRequest</vnfsdn-action>
+ <rpc-action>assign</rpc-action>
+ </service-status>
+</vnf-list>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml
new file mode 100644
index 0000000000..677ecb7444
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml
@@ -0,0 +1,141 @@
+<output xmlns="com:att:sdnctl:vnf">
+ <vnf-list xmlns="com:att:sdnctl:vnf">
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743a</vnf-id>
+ <service-status>
+ <response-code>200</response-code>
+ <final-indicator>Y</final-indicator>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2016-06-08T19:44:59.138Z</response-timestamp>
+ <rpc-name>vnf-topology-operation</rpc-name>
+ <vnfsdn-action>VNFActivateRequest</vnfsdn-action>
+ <rpc-action>assign</rpc-action>
+ </service-status>
+ <service-data>
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743</vnf-id>
+ <service-information>
+ <subscriber-name>notsurewecare</subscriber-name>
+ <service-instance-id>28455973-1ee5-4ad1-8d35-c4732679743a</service-instance-id>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ </service-information>
+ <sdnc-request-header>
+ <svc-request-id>5e168556-a5c6-4813-bff3-cc03007afbbc</svc-request-id>
+ <svc-notification-url>http://localhost:8080/adapters/rest/SDNCNotify</svc-notification-url>
+ <svc-action>assign</svc-action>
+ </sdnc-request-header>
+ <vnf-request-information>
+ <aic-cloud-region>AAIAIC25</aic-cloud-region>
+ <vnf-name>MSOTEST06-vSAMP3::base::module-0</vnf-name>
+ <generic-vnf-id>91ad7ab0-9ffd-471d-971c-3eb913a2cc75</generic-vnf-id>
+ <generic-vnf-type>Test/vSAMP3 1</generic-vnf-type>
+ <generic-vnf-name>MSOTEST06</generic-vnf-name>
+ <tenant>4ae1d3446a4c48b2bec44b6cfba06d68</tenant>
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743a</vnf-id>
+ <vnf-type>vSAMP3::base::module-0</vnf-type>
+ </vnf-request-information>
+ <oper-status>
+ <order-status>PendingCreate</order-status>
+ </oper-status>
+ <vnf-topology-information>
+ <vnf-parameters>
+ <vnf-parameter-name>image</vnf-parameter-name>
+ <vnf-parameter-value>Ubuntu_Perf</vnf-parameter-value>
+ </vnf-parameters>
+ <vnf-parameters>
+ <vnf-parameter-name>flavor</vnf-parameter-name>
+ <vnf-parameter-value>m1.small</vnf-parameter-value>
+ </vnf-parameters>
+ <vnf-assignments>
+ <vnf-networks>
+ <network-role>int_imbl</network-role>
+ <network-id>680b7453-0ec4-4d96-b355-280d981d418f</network-id>
+ <network-name>Nimbus-25193-T-Willows2_int_imbl_net_1</network-name>
+ <contrail-network-fqdn>default-domain:Nimbus-25193-T-Willows2:Nimbus-25193-T-Willows2_int_imbl_net_1</contrail-network-fqdn>
+ <subnet-id></subnet-id>
+ <ipv6-subnet-id>775607fb-e16a-45ef-94a7-82fba0d16eec</ipv6-subnet-id>
+ <neutron-id>640d07fb-e16a-45ef-94a7-82fba0d169bf</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>sgi_protected</network-role>
+ <network-id>f9039ce9-e3cf-4716-b2d1-ec7912178ea4</network-id>
+ <network-name>Nimbus-25193-T-Willows2_sgi_protected_net_1</network-name>
+ <contrail-network-fqdn>default-domain:Nimbus-25193-T-Willows2:Nimbus-25193-T-Willows2_sgi_protected_net_1</contrail-network-fqdn>
+ <subnet-id>b9999ce9-e3cf-4716-b2d1-ec791217678c</subnet-id>
+ <ipv6-subnet-id></ipv6-subnet-id>
+ <neutron-id>bf11bba8-b971-4ab5-8281-215b3fedcd3c</neutron-id>
+ </vnf-networks>
+ <vnf-vms>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>2606:ae00:2e01:800::67</ip-address-ipv6>
+ </network-ips-v6>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ <floating-ip-v6>2001:1890:1001:2B32::29:C</floating-ip-v6>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>aa::aa::aa::aa::aa::aa</ip-address-ipv6>
+ </network-ips-v6>
+ <network-ips-v6>
+ <ip-address-ipv6>bb::bb::bb::bb::bb::bb</ip-address-ipv6>
+ </network-ips-v6>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>1.2.3.4/26</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>2002::/64</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip-v6>1111:1890:1001:2B32::29:D</floating-ip-v6>
+ </vm-networks>
+ </vnf-vms>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ </vnf-assignments>
+ <vnf-topology-identifier>
+ <vnf-name>MSOTEST06-vSAMP3::base::module-0</vnf-name>
+ <service-type>SDN-MOBILITY</service-type>
+ <vnf-type>vSAMP3::base::module-0</vnf-type>
+ <generic-vnf-type>Test/vSAMP3 1</generic-vnf-type>
+ <generic-vnf-name>MSOTEST06</generic-vnf-name>
+ </vnf-topology-identifier>
+ </vnf-topology-information>
+ <request-information>
+ <request-id>5e168556-a5c6-4813-bff3-cc03007afbbc</request-id>
+ <notification-url></notification-url>
+ <source>SoapUI-bns-vf-base-vSAMP3-9001</source>
+ <request-action>VNFActivateRequest</request-action>
+ </request-information>
+ </service-data>
+</vnf-list>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml
new file mode 100644
index 0000000000..c50c25671b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml
@@ -0,0 +1,81 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vf-module-topology xmlns="org:onap:sdnc:northbound:generic-resource">
+ <vf-module-topology-identifier>
+ <vf-module-id>0725b072-b854-4705-bf8e-c1a1eb08651e</vf-module-id>
+ <vf-module-type>vSAMP10aDEV::base::module-0</vf-module-type>
+ <vf-module-name>zmtn6nf-code-111_base_0</vf-module-name>
+ </vf-module-topology-identifier>
+ <onap-model-information>
+ <model-name>vSAMP10aDEV::base::module-0</model-name>
+ <model-customization-uuid>819ef122-ca19-4141-a61e-62922f8fc279</model-customization-uuid>
+ <model-version>ff2ae348-214a-11e7-93ae-92361f002673</model-version>
+ <model-invariant-uuid>3a97db99-c4bb-498a-a13a-38f65f1ced3d</model-invariant-uuid>
+ <model-uuid>ff2ae348-214a-11e7-93ae-92361f002673</model-uuid>
+ </onap-model-information>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ <aic-cloud-region>mtn6</aic-cloud-region>
+ <aic-clli>AUSTTXGR</aic-clli>
+ <vf-module-parameters>
+ <param>
+ <name>image</name>
+ <value>Ubuntu_Perf</value>
+ </param>
+ <param>
+ <name>flavor</name>
+ <value>m1.small</value>
+ </param>
+ </vf-module-parameters>
+ <vf-module-assignments>
+ <vms>
+ <vm>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>2606:ae00:2e01:800::67</ip-address-ipv6>
+ </network-ips-v6>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ <floating-ip-v6>2001:1890:1001:2B32::29:C</floating-ip-v6>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>aa::aa::aa::aa::aa::aa</ip-address-ipv6>
+ </network-ips-v6>
+ <network-ips-v6>
+ <ip-address-ipv6>bb::bb::bb::bb::bb::bb</ip-address-ipv6>
+ </network-ips-v6>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>1.2.3.4/26</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>2002::/64</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip-v6>1111:1890:1001:2B32::29:D</floating-ip-v6>
+ </vm-networks>
+ </vm>
+ </vms>
+ </vf-module-assignments>
+</vf-module-topology>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml
new file mode 100644
index 0000000000..ba98ef8838
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml
@@ -0,0 +1,82 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vnf-topology xmlns="org:onap:sdnc:northbound:generic-resource">
+ <vnf-topology-identifier-structure>
+ <nf-type>nf-type-1</nf-type>
+ <vnf-name>zmtn6nf-code-111</vnf-name>
+ <nf-role>nf-role-1</nf-role>
+ <nf-function>nf-function-1</nf-function>
+ <nf-code>nf-code-1</nf-code>
+ <vnf-id>eac30f85-f61f-4c5f-862e-2c62f9e135de</vnf-id>
+ <vnf-type>null</vnf-type>
+ </vnf-topology-identifier-structure>
+ <onap-model-information>
+ <model-name>vSAMP10a_macro</model-name>
+ <model-customization-uuid>819ef122-ca19-4141-a61e-62922f8fc279</model-customization-uuid>
+ <model-version>1.0</model-version>
+ <model-invariant-uuid>ef176121-f02c-4dd3-927c-22131d48446b</model-invariant-uuid>
+ <model-uuid>ff2ae348-214a-11e7-93ae-92361f002672</model-uuid>
+ </onap-model-information>
+ <vnf-resource-assignments>
+ <vnf-networks>
+ <network-role>mog_exn</network-role>
+ <network-id>03dbd833-785c-40c0-bf32-37594b5334bc</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_exn_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>6f82d234-41a4-48e9-a9e8-415667a72929</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_oam</network-role>
+ <network-id>3f181cde-9380-4c20-9d3a-e1a4ee74f994</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_oam_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>713b6770-13fa-4949-8dbb-a1288c5e5932</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-id>821a550a-3f50-4725-995b-f212d5caec7c</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>18926e56-12b6-4a4d-98b6-37e0c05626ee</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-id>3dabf5c0-cffb-420c-8960-8499c74eb25f</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_2</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>35530b29-a4de-48ff-a014-111110ccc652</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_gn</network-role>
+ <network-id>3ce97321-6e7f-49af-bd12-f833e377c310</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_gn_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>32bfdd2c-28e1-4895-87a6-373bf12c3129</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_dmz</network-role>
+ <network-id>d43ca910-02a5-47dc-8510-100a68a3c9e0</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_dmz_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>cb9500fb-943f-412e-aea6-458711564a75</neutron-id>
+ </vnf-networks>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ </vnf-resource-assignments>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ <aic-cloud-region>mtn6</aic-cloud-region>
+ <aic-clli>AUSTTXGR</aic-clli>
+</vnf-topology>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
new file mode 100644
index 0000000000..77528ccf61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
@@ -0,0 +1,5 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <SDNCAdapterResponse xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1"/>
+ </soap:Body>
+</soap:Envelope> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml
new file mode 100644
index 0000000000..49ecd0bf3f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml
@@ -0,0 +1,55 @@
+<createVfModuleResponse>
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleCreated>true</vfModuleCreated>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+<key>server1_private_ip</key>
+<value>192.168.28.3</value>
+</entry>
+<entry>
+<key>contrail-service-instance-fqdn</key>
+<value>default-domain:MSOTest:MsoNW-RA</value>
+</entry>
+<entry>
+<key>policyKey1_contrail_network_policy_fqdn</key>
+<value>MSOTest:DefaultPolicyFQDN1</value>
+</entry>
+<entry>
+<key>policyKey2_contrail_network_policy_fqdn</key>
+<value>MSOTest:DefaultPolicyFQDN2</value>
+</entry>
+<entry>
+<key>oam_management_v6_address</key>
+<value>2000:abc:bce:1111</value>
+</entry>
+<entry>
+<key>oam_management_v4_address</key>
+<value>127.0.0.1</value>
+</entry>
+ </vfModuleOutputs>
+ <rollback> <!-- JC's doc has "vfModuleRollback" -->
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleCreated>true</vfModuleCreated>
+ <tenantId>tenantId</tenantId>
+ <cloudSiteId>cloudSiteId</cloudSiteId>
+ <msoRequest>
+ <requestId>requestId</requestId>
+ <serviceInstanceId>serviceInstanceId</serviceInstanceId>
+ </msoRequest>
+ <messageId>{{MESSAGE-ID}}</messageId> <!-- JC's doc does not have this -->
+ </rollback>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</createVfModuleResponse>
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml
new file mode 100644
index 0000000000..61aeaa7d66
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml
@@ -0,0 +1,15 @@
+<deleteVfModuleRequest>
+ <messageId>testMessageId</messageId>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>testNotificationUrl</notificationUrl>
+ <cloudSiteId>testAicCloudRegion}</cloudSiteId>
+ <tenantId>testTenantId</tenantId>
+ <vnfId>testVnfId</vnfId>
+ <vfModuleId>testVfModuleId</vfModuleId>
+ <vfModuleStackId>testVfModuleStackId</vfModuleStackId>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>testServiceInstanceId</serviceInstanceId>
+ <synchronous>false</synchronous>
+ </msoRequest>
+</deleteVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml
new file mode 100644
index 0000000000..b5b61192f7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml
@@ -0,0 +1,56 @@
+<deleteVfModuleResponse>
+ <messageId>testMessageId</messageId>
+ <vfModuleDeleted>true</vfModuleDeleted>
+ <vfModuleId>testVfModuleId</vfModuleId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+ <key>server1_private_ip</key>
+ <value>192.168.28.3</value>
+ </entry>
+ <entry>
+ <key>contrail-service-instance-fqdn</key>
+ <value>default-domain:MSOTest:MsoNW-RA</value>
+ </entry>
+ <entry>
+ <key>policyKey1_contrail_network_policy_fqdn</key>
+ <value>MSOTest:DefaultPolicyFQDN1</value>
+ </entry>
+ <entry>
+ <key>policyKey2_contrail_network_policy_fqdn</key>
+ <value>MSOTest:DefaultPolicyFQDN2</value>
+ </entry>
+ <entry>
+ <key>oam_management_v6_address</key>
+ <value>2000:abc:bce:1111</value>
+ </entry>
+ <entry>
+ <key>oam_management_v4_address</key>
+ <value>127.0.0.1</value>
+ </entry>
+ <entry>
+ <key>internal_security_group</key>
+ <value>test_internal_security_group</value>
+ </entry>
+ <entry>
+ <key>int_internal_net_id</key>
+ <value>test_int_internal_net_id</value>
+ </entry>
+ <entry>
+ <key>dsx_server_group_id</key>
+ <value>test_dsx_server_group_id</value>
+ </entry>
+ <entry>
+ <key>mcas_host_key</key>
+ <value>test_mcas_host_key</value>
+ </entry>
+ </vfModuleOutputs>
+ <vnfId>testVnfId</vnfId>
+</deleteVfModuleResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml
new file mode 100644
index 0000000000..c602dd9667
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml
@@ -0,0 +1,16 @@
+<updateVfModuleResponse>
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ </vfModuleOutputs>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</updateVfModuleResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml
new file mode 100644
index 0000000000..830d2e2237
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml
@@ -0,0 +1,15 @@
+<updateVolumeGroupResponse>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>slowburn</volumeGroupStackId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ </vfModuleOutputs>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</updateVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
new file mode 100644
index 0000000000..ba0b4e4609
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
@@ -0,0 +1,10 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-1</vf-module-name>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <resource-version>330-90</resource-version>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml
new file mode 100644
index 0000000000..2ccba7d056
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml
@@ -0,0 +1,9 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>b37d96db-7d2c-47ce-bf61-a6c7b82fe161</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <model-invariant-id>00000000-0000-0000-0000-000000000000</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <orchestration-status>PendingActivation</orchestration-status>
+ <resource-version>330-90</resource-version>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml
new file mode 100644
index 0000000000..481410c3f6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml
@@ -0,0 +1,9 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>b37d96db-7d2c-47ce-bf61-a6c7b82fe161</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <model-invariant-id>00000000-0000-0000-0000-000000000000</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>330-90</resource-version>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml
new file mode 100644
index 0000000000..49513f1eac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml
@@ -0,0 +1,27 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-2</vf-module-name>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <is-base-vf-module>false</is-base-vf-module>
+ <resource-version>330-89</resource-version>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <relationship-list>
+ <relationship>
+ <related-to>volume-group</related-to>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>pdk1</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>volume-group.volume-group-id</relationship-key>
+ <relationship-value>78987</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml
new file mode 100644
index 0000000000..df84706ec5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml
@@ -0,0 +1,25 @@
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>Volume_2</volume-group-name>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>MDTWNJ21</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml
new file mode 100644
index 0000000000..b8b8a4ff20
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml
@@ -0,0 +1,3 @@
+<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+</ns2:deleteNetworkResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json
new file mode 100644
index 0000000000..76616e14a5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json
@@ -0,0 +1,37 @@
+{
+ "requestDetails": {
+ "project": {
+ "projectName": "vSAMP12 Project"
+ },
+ "owningEntity": {
+ "owningEntityId": "MSO-Test-OE",
+ "owningEntityName": "MSO-Test123"
+ },
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "d214abcc-2083-11e7-93ae-92361f002671",
+ "modelUuid": "c4503baa-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP12_Service",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "requestInfo": {
+ "instanceName": "bensServiceInstance3",
+ "source": "VID",
+ "suppressRollback": "true",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "aLaCarte": "false",
+ "userParams": []
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json
new file mode 100644
index 0000000000..36b51e9575
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json
@@ -0,0 +1,16 @@
+{
+ "CreateServiceInstanceV3": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "project": {
+ "@class": "inventory.aai.onap.org.v12.Project"
+ },
+ "owningEntity": {
+ "@class": "inventory.aai.onap.org.v12.OwningEntity"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
new file mode 100644
index 0000000000..007615e569
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
@@ -0,0 +1,340 @@
+aai:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ dme2:
+ timeout: '30000'
+ endpoint: https://localhost:8443
+camunda:
+ bpm:
+ admin-user:
+ id: admin
+ password: admin
+ database:
+ type: h2
+ history-level: FULL
+ metrics:
+ enabled: false
+ db-reporter-activate: false
+canopi:
+ auth: 757A94191D685FD2092AC1490730A4FC
+csi:
+ aots:
+ addincidentmanagement:
+ endpoint: http://localhost:28090/AddIncidentManagementTicketRequest
+ networkstatus:
+ endpoint: http://localhost:28090/SendManagedNetworkStatusNotification
+entitymanager:
+ packagesToScan: com
+
+mso:
+ correlation:
+ timeout: PT60S
+ logPath: logs
+ async:
+ core-pool-size: 50
+ max-pool-size: 50
+ queue-capacity: 500
+ adapters:
+ completemsoprocess:
+ endpoint: http://localhost:30253/CompleteMsoProcess
+ db:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: wLg4sjrAFUS8rfVfdvTXeQ==
+ endpoint: http://localhost:28090
+ spring:
+ endpoint: http://localhost:28090
+ network:
+ endpoint: http://localhost:30253/services/NetworkAdapter
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/networks
+ openecomp:
+ db:
+ endpoint: http://localhost:30257/services/RequestsDbAdapter
+ po:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: 3141634BF7E070AA289CF2892C986C0B
+ sdnc:
+ endpoint: http://localhost:30254/adapters/SDNCAdapter
+ rest:
+ endpoint: http://localhost:30254/adapters/rest/v1/sdnc
+ timeout: PT60S
+ tenant:
+ endpoint: http://localhost:30253/services/TenantAdapter
+ vnf:
+ endpoint: http://localhost:30253/services/VnfAdapter
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/vnfs
+ volume-groups:
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/volume-groups
+ vnf-async:
+ endpoint: http://localhost:30253/services/VnfAdapterAsync
+ adiod:
+ vce:
+ service:
+ model:
+ invariant:
+ uuid: 1cc4e2e4-eb6e-404d-a66f-c8733cedcce8
+ version: '5.0'
+ bpmn:
+ process:
+ historyTimeToLive: '30'
+ callbackRetryAttempts: '5'
+ catalog:
+ db:
+ endpoint: http://localhost:30258/ecomp/mso/catalog
+ spring:
+ endpoint: http://localhost:30258
+ csi:
+ pwd: 4EA237303511EFBBC37F17A351562131
+ sendmanagednetworkstatusnotification:
+ applicationname: NetworkManagementEthernetOverFiber
+ version: '212'
+ usrname: mso
+ db:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ default:
+ adapter:
+ namespace: http://com.att.mso
+ gateway:
+ service:
+ model:
+ name: HNGWaaS for DHV Test
+ healthcheck:
+ log:
+ debug: 'false'
+ infra:
+ customer:
+ id: testCustIdInfra
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+ oam:
+ network:
+ role:
+ gateway: HngwOamNetVto.OAM
+ portal: HnportalOamNetVto.OAM
+ po:
+ timeout: PT60S
+ portal:
+ service:
+ model:
+ name: HNPortalaaS for DHV Test
+ request:
+ db:
+ endpoint: http://localhost:28090/
+ rollback: 'true'
+ sdnc:
+ firewall:
+ yang:
+ model:
+ version: '2015-05-15'
+ password: 3141634BF7E070AA289CF2892C986C0B
+ timeout:
+ firewall:
+ minutes: '20'
+ ucpe:
+ async:
+ hours: '120'
+ minutes: '5'
+ service:
+ agnostic:
+ sniro:
+ endpoint: /sniro/api/v2/placement
+ host: http://localhost:30253
+ site-name: CamundaEngine
+ sniro:
+ auth: test:testpwd
+ callback: http://localhost:28090/adapters/rest/SDNCNotify
+ endpoint: http://localhost:28090/optimizationInstance/V1/create
+ policies:
+ dhv:
+ 2vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+ 4vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+ timeout: PT30M
+ sriov:
+ network:
+ role:
+ gateway1: HngwSriovProviderNet.SR_IOV_Provider2_1
+ gateway2: HngwSriovProviderNet.SR_IOV_Provider2_2
+ portal1: HnportalSriovProviderNet3.SR_IOV_Provider2_1
+ portal2: HnportalSriovProviderNet3.SR_IOV_Provider2_2
+ workflow:
+ aai:
+ distribution:
+ delay: PT5S
+ CreateGenericVNFV1:
+ aai:
+ volume-group:
+ uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group
+ DHVCreateService:
+ aai:
+ customer:
+ uri: /aai/v9/business/customers/customer
+ createvce:
+ delay:
+ seconds: '1'
+ default:
+ aai:
+ version: '8'
+ cloud-region:
+ version: '9'
+ generic-vnf:
+ version: '9'
+ v11:
+ customer:
+ uri: /aai/v11/business/customers/customer
+ generic-query:
+ uri: /aai/v11/search/generic-query
+ generic-vnf:
+ uri: /aai/v11/network/generic-vnfs/generic-vnf
+ l3-network:
+ uri: /aai/v11/network/l3-networks/l3-network
+ network-policy:
+ uri: /aai/v11/network/network-policies/network-policy
+ nodes-query:
+ uri: /aai/v11/search/nodes-query
+ route-table-reference:
+ uri: /aai/v11/network/route-table-references/route-table-reference
+ tenant:
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+ vce:
+ uri: /aai/v11/network/vces/vce
+ vpn-binding:
+ uri: /aai/v11/network/vpn-bindings/vpn-binding
+ v8:
+ configuration:
+ uri: /aai/v11/network/configurations/configuration
+ 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
+ retry:
+ attempts: '1'
+ deleteCinderVolumeV1:
+ aai:
+ volume-group:
+ uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group
+ global:
+ default:
+ aai:
+ namespace: http://org.openecomp.aai.inventory/
+ l3ToHigherLayerAddBonding:
+ model:
+ invariantid: 50359538-066f-4a8d-807f-f2bc8eaa79dc
+ name: WAN Bonding v0.1
+ version: '0.1'
+ versionid: 52dbec20-47aa-42e4-936c-331d8e350d44
+ message:
+ endpoint: http://localhost:30252/mso/WorkflowMessage
+ notification:
+ name: GenericNotificationServiceATT
+ sdncadapter:
+ callback: http://localhost:30254/mso/SDNCAdapterCallbackService
+ vnfadapter:
+ create:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ delete:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ query:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ rollback:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+policy:
+ auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+ client:
+ auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+ endpoint: https://localhost:8081/pdp/api/
+ environment: TEST
+sdnc:
+ auth: Basic YWRtaW46YWRtaW4=
+ host: https://localhost:8443
+ path: /restconf/operations/GENERIC-RESOURCE-API
+sdno:
+ health-check:
+ dmaap:
+ password: eHQ1cUJrOUc
+ publisher:
+ topic: com.att.sdno.test-health-diagnostic-v02
+ subscriber:
+ topic: com.att.sdno.test-health-diagnostic-v02
+ username: testuser
+sniro:
+ conductor:
+ host: http://localhost:30253
+ uri: /release
+ manager:
+ host: http://localhost:30253
+ uri: /sniro/api/placement/v2
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ headers.patchVersion: 1
+ headers.minorVersion: 1
+ headers.latestVersion: 2
+server:
+ port: 8080
+ tomcat:
+ max-threads: 50
+ # ssl:
+ # key-store: /app/msoClientKeyStore.jks
+ # key-store-password: mso4you
+ # key-store-type: JKS
+ # trust-store: /app/msoTrustStore.jks
+ # trust-store-password: mso_Domain2.0_4you
+spring:
+ h2:
+ console:
+ enabled: true
+ path: /h2
+ datasource:
+ url: jdbc:h2:mem:AZ;;DB_CLOSE_ON_EXIT=FALSE
+ username: sa
+ password: sa
+ driverClassName: org.h2.Driver
+ security:
+ usercredentials:
+ -
+ username: test
+ password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+ role: BPMN-Client
+# Hibernate
+hibernate:
+ dialect: org.hibernate.dialect.MySQL5Dialect
+ show_sql: false
+
+management:
+ security:
+ enabled: false
+
+security:
+ basic:
+ enabled: false
+
+appc:
+ client:
+ topic:
+ read:
+ name: APPC-TEST-AMDOCS2
+ timeout: 360000
+ write: APPC-TEST-AMDOCS1-IST
+ response:
+ timeout: 360000
+ key: LSl8QKolmKcC0yJR
+ secret: lgjXraD1HutKxv8jEN6tVouu
+ service: ueb
+ poolMembers: localhost:3904,localhost:3904,localhost:3904 \ 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
new file mode 100644
index 0000000000..ebefee7b08
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml
@@ -0,0 +1,65 @@
+<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-infrastructure-flows/src/test/resources/catalogDBClientProps.properties b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties
new file mode 100644
index 0000000000..bca529f960
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties
@@ -0,0 +1 @@
+catalog.db.endpoint= http://localhost: \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..38a2ef6ef5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml
@@ -0,0 +1,44 @@
+<configuration>
+
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] |%X{RequestId}| %-5level
+ %logger{1024} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="com.att.ecomp.audit" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+
+ <logger name="ch.vorburger" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="AUDIT" level="info" additivity="true">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <root level="WARN">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+
+</configuration> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties
new file mode 100644
index 0000000000..758a6edd97
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties
@@ -0,0 +1 @@
+requests.db.endpoint= http://localhost: \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn
new file mode 100644
index 0000000000..66f458425e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn
@@ -0,0 +1,35 @@
+<?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="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="GenericStub" name="GenericStub" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0tyavm9</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0n56tas">
+ <bpmn2:incoming>SequenceFlow_0tyavm9</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tyavm9" sourceRef="StartEvent_1" targetRef="EndEvent_0n56tas" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericStub">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="147" y="275" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ougemc_di" bpmnElement="EndEvent_0n56tas">
+ <dc:Bounds x="263" y="275" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="236" y="311" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tyavm9_di" bpmnElement="SequenceFlow_0tyavm9">
+ <di:waypoint xsi:type="dc:Point" x="183" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="263" y="293" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="223" y="272" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>